package com.cloudminga.gui;

import com.globussoft.amazons3.UploadFile;
import com.globussoft.filesystem.*;
import com.globussoft.xml.CreatXMLFile;
import com.globussoft.xml.SettingsXml;
import com.globussoft.xml.XmlAdvancedStore;
import com.globussoft.xml.XmlGeneralStore;
import com.globussoft.xml.XmlPerformanceStore;
import com.globussoft.xml.XmlSchedulingStore;
import com.cloudminga.database.*;
import com.globussoft.util.FormatedFileSize;
import java.awt.AWTEvent;
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.util.Date;
import java.util.HashMap;
import javax.swing.*;
import javax.swing.table.DefaultTableModel;
import javax.xml.parsers.ParserConfigurationException;

public class MainForm extends javax.swing.JFrame implements ActionListener {

    Dimension screenSize;//sets screen size
    JPopupMenu popupmenu;//adding popupmenu to the BackupSeView
    JMenuItem add_backup_sets;//adding MenuItem add backupset to the BackupSetView
    static String selectedButton = "";
    public static Object[][] table_RestoreInfo;
    Restore_DatabaseDisplay restoreObj;
    UploadFile uploadFileObj;
    XmlAdvancedStore advanceOption;
    XmlGeneralStore generalOption;
    XmlPerformanceStore performanceOption;
    XmlSchedulingStore schedulingOption;
    static String type;
    private String projectName = "";
    private static long backupSetFilesSize = 0;
    private static int backupSetSelectedFiles = 0;
    SettingsXml setting;
    private static boolean isOpened = false;
    private static String selecedTab;

    public static boolean isFormOpened() {
        return isOpened;
    }

    public static void setOpened(boolean isopen) {
        isOpened = isopen;
    }

    public static long getBackupSetFilesSize() {
        return backupSetFilesSize;
    }

    public void resize() {
        this.setVisible(true);
        this.setState(Frame.NORMAL);
    }

    public static int getBackupSetSelectedFiles() {
        return backupSetSelectedFiles;
    }

    public static Object[][] getRestoreInfo() {
        return table_RestoreInfo;
    }

    public static String getType() {
        return type;
    }

    public static void setType(String _type) {
        type = _type;
    }

    public MainForm() {
        //  super("Pomblast: On line backup Build 1.00.0003");
        projectName = SettingsXml.getProjectName();
        this.setTitle(projectName + ": On line backup Build 1.00.0003");
        initComponents();
        popupmenu = new JPopupMenu();
        add_backup_sets = new JMenuItem("Add Backup sets");
        popupmenu.add(add_backup_sets);
        backupsetLeftTable.add(popupmenu); /* add Popup to Component*/
        enableEvents(AWTEvent.MOUSE_EVENT_MASK);
        restoreObj = new Restore_DatabaseDisplay();
        uploadFileObj = new UploadFile();
        jRadioButton4.setSelected(true);
        advanceOption = new XmlAdvancedStore();
        generalOption = new XmlGeneralStore();
        performanceOption = new XmlPerformanceStore();
        schedulingOption = XmlSchedulingStore.getnstance();
        DateCombo.setVisible(false);
        MonthCombo.setVisible(false);
        YearCombo.setVisible(false);
        type = "Manual";
        projectName = SettingsXml.getProjectName();
        setting = new SettingsXml();

        try {
            /* code to set the look and feel according to the native operating system */

            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            SwingUtilities.updateComponentTreeUI(this);

        } catch (Exception e) {

            Logger.LogText("Problem in setting look and feel");
        }
        // setLocationRelativeTo(this);/*to dispaly frame at the centre of the screen*/
        //setResizable();
        Toolkit toolkit = Toolkit.getDefaultToolkit();
        Dimension SizeOfScreen = toolkit.getScreenSize();
        int x = ((SizeOfScreen.width - 800) / 2);
        int y = ((SizeOfScreen.height - 700) / 2);
        setLocation(x, y);
        setSize(800, 700);
        add_backup_sets.addActionListener(this);


        TestFileTree filetree = new TestFileTree(); /*creating instance of FileTree*/
        filetree.setSize(300, 100);
        filetree.setVisible(true);
        filetreePanel.add(filetree);/*adding filetree to the filetreePanel*/
        new Thread() {

            @Override
            public void run() {
                BackupSetView.getInstance().printBackSet();
            }
        }.start();

        fileTable.setFillsViewportHeight(true);
        filetreePanel.setSize(200, 1000);
        filetreePanel.revalidate();
        filetreePanel.repaint();
//

//        /* Set the first column of fileTable to 10 pixels wide*/
        int TablecolIndex = 0;
        int width = 10;
        fileTable.getColumnModel().getColumn(TablecolIndex).setPreferredWidth(width);
        bacupsetViewFileTable.getColumnModel().getColumn(TablecolIndex).setPreferredWidth(width);
        backupsetLeftTable.getColumnModel().getColumn(TablecolIndex).setPreferredWidth(width);
    }

    public static String getSelectionButton() {
        return selectedButton;
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        mainPanel = new javax.swing.JPanel();
        displayPanel = new javax.swing.JPanel();
        backupPanel = new javax.swing.JPanel();
        jSplitPane2 = new javax.swing.JSplitPane();
        backupLeftScrollPane = new javax.swing.JScrollPane();
        backupsetLeftTable = new javax.swing.JTable();
        backupRightScrollPane = new javax.swing.JScrollPane();
        bacupsetViewFileTable = new javax.swing.JTable();
        optionPanel = new javax.swing.JPanel();
        optionTabbedPane = new javax.swing.JTabbedPane();
        generalPanel = new javax.swing.JPanel();
        backupStatusCheckBox = new javax.swing.JCheckBox();
        warnCheckBox = new javax.swing.JCheckBox();
        alertSpinner = new javax.swing.JSpinner();
        alertLabel = new javax.swing.JLabel();
        performancePanel = new javax.swing.JPanel();
        throttlingPanel = new javax.swing.JPanel();
        limitLabel = new javax.swing.JLabel();
        enableCheckBox = new javax.swing.JCheckBox();
        throttleRadioButton = new javax.swing.JRadioButton();
        throttlehrsRadioButton = new javax.swing.JRadioButton();
        enableSlider = new javax.swing.JSlider();
        timefromLabel = new javax.swing.JLabel();
        timefromSpinner = new javax.swing.JSpinner();
        Timetolabel = new javax.swing.JLabel();
        timetoSpinner = new javax.swing.JSpinner();
        capacityLabel = new javax.swing.JLabel();
        jPanel6 = new javax.swing.JPanel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jSlider1 = new javax.swing.JSlider();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        Scheduling = new javax.swing.JPanel();
        autobackupRadioButton = new javax.swing.JRadioButton();
        automaticparametersPanel = new javax.swing.JPanel();
        CPUstatusSpinner = new javax.swing.JSpinner();
        CPUidleSpinner = new javax.swing.JSpinner();
        NumoftimeSpinner = new javax.swing.JSpinner();
        CPUstatusLabel = new javax.swing.JLabel();
        CPUidleLabel = new javax.swing.JLabel();
        numoftimesLabel = new javax.swing.JLabel();
        schedulebackuptimeRadioButton = new javax.swing.JRadioButton();
        scheulePanel = new javax.swing.JPanel();
        scheduleComboBox = new javax.swing.JComboBox();
        backupLabel = new javax.swing.JLabel();
        backuptimeSpinner = new javax.swing.JSpinner();
        daySpinner = new javax.swing.JSpinner();
        dayLabel = new javax.swing.JLabel();
        daysLabel = new javax.swing.JLabel();
        onDayCombo = new javax.swing.JComboBox();
        OnLabel = new javax.swing.JLabel();
        HoursLabel = new javax.swing.JLabel();
        tempSuspendCheckBox = new javax.swing.JCheckBox();
        noNetworkCheckBox = new javax.swing.JCheckBox();
        autoBatteryBackCheckBox = new javax.swing.JCheckBox();
        advancedPanel = new javax.swing.JPanel();
        updateCheckBox = new javax.swing.JCheckBox();
        virtualdriveCheckBox = new javax.swing.JCheckBox();
        autoLogCheckBox = new javax.swing.JCheckBox();
        preConfigCheckBox = new javax.swing.JCheckBox();
        adFeatureCheckBox = new javax.swing.JCheckBox();
        shRestoreOptionCheckBox = new javax.swing.JCheckBox();
        enSupportOpenCheckBox = new javax.swing.JCheckBox();
        enSupportEFScheckBox = new javax.swing.JCheckBox();
        shProtectedCheckBox = new javax.swing.JCheckBox();
        cofigureProxyBt = new javax.swing.JButton();
        historyPanel = new javax.swing.JPanel();
        historySplitPane = new javax.swing.JSplitPane();
        historyTopScrollpane = new javax.swing.JScrollPane();
        historyTopTable = new javax.swing.JTable();
        HistoryBottomScrollPane = new javax.swing.JScrollPane();
        historyBottomTable = new javax.swing.JTable();
        filesystemPanel = new javax.swing.JPanel();
        filesplitPanel = new javax.swing.JSplitPane();
        fileLeftScrollPane = new javax.swing.JScrollPane();
        fileTable = new javax.swing.JTable();
        filetreePanel = new javax.swing.JPanel();
        welcomePanel = new javax.swing.JPanel();
        topDisplayPanel = new javax.swing.JPanel();
        welcomeLabel = new javax.swing.JLabel();
        LeftDisplayPanel = new javax.swing.JPanel();
        whatPomLabel = new javax.swing.JLabel();
        howBackLabel = new javax.swing.JLabel();
        howRestoreLabel = new javax.swing.JLabel();
        RightDisplayPanel = new javax.swing.JPanel();
        howBackContentLabel = new javax.swing.JLabel();
        howRestoreContentLabel = new javax.swing.JLabel();
        whatPomContentLabel = new javax.swing.JLabel();
        restorePanel = new javax.swing.JPanel();
        jPanel5 = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        searchText = new javax.swing.JTextField();
        searchButton = new javax.swing.JButton();
        searchRadioButton = new javax.swing.JRadioButton();
        DateCombo = new javax.swing.JComboBox();
        MonthCombo = new javax.swing.JComboBox();
        YearCombo = new javax.swing.JComboBox();
        jPanel2 = new javax.swing.JPanel();
        jSplitPane1 = new javax.swing.JSplitPane();
        jPanel3 = new javax.swing.JPanel();
        RestoreRightPane = new javax.swing.JScrollPane();
        RestoreRightTable = new javax.swing.JTable();
        jPanel4 = new javax.swing.JPanel();
        jRadioButton3 = new javax.swing.JRadioButton();
        jRadioButton4 = new javax.swing.JRadioButton();
        folderText = new javax.swing.JTextField();
        jButton2 = new javax.swing.JButton();
        jButton3 = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();
        logoPanel = new javax.swing.JPanel();
        logoLabel = new javax.swing.JLabel();
        statusMainPanel = new javax.swing.JPanel();
        statusPanel = new javax.swing.JPanel();
        StatusButtonPanel = new javax.swing.JPanel();
        ProgressBarPanel = new javax.swing.JPanel();
        raisequotaButton = new javax.swing.JButton();
        ProgressBar = new javax.swing.JProgressBar();
        saveButton = new javax.swing.JButton();
        cancelButton = new javax.swing.JButton();
        detailPanel = new javax.swing.JPanel();
        Quota_label = new javax.swing.JLabel();
        QuotaDisplayLabel = new javax.swing.JLabel();
        Used_label = new javax.swing.JLabel();
        UsedDisplayLabel = new javax.swing.JLabel();
        Remaining_label = new javax.swing.JLabel();
        RemainingDisplayLabel = new javax.swing.JLabel();
        File_label = new javax.swing.JLabel();
        FileDisplayLabel = new javax.swing.JLabel();
        mainMenuPanel = new javax.swing.JPanel();
        menuPanel = new javax.swing.JPanel();
        welcomeButton = new javax.swing.JButton();
        backupsetsButton = new javax.swing.JButton();
        filesystemButton = new javax.swing.JButton();
        optionsButton = new javax.swing.JButton();
        historyButton = new javax.swing.JButton();
        Restore_bt = new javax.swing.JButton();

        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosed(java.awt.event.WindowEvent evt) {
                formWindowClosed(evt);
            }
            public void windowClosing(java.awt.event.WindowEvent evt) {
                formWindowClosing(evt);
            }
        });

        mainPanel.setBackground(new java.awt.Color(255, 255, 255));
        mainPanel.setLayout(new java.awt.CardLayout());

        displayPanel.setPreferredSize(new java.awt.Dimension(600, 300));
        displayPanel.setLayout(new java.awt.CardLayout());

        backupPanel.setPreferredSize(new java.awt.Dimension(700, 300));
        backupPanel.setLayout(new java.awt.GridLayout(1, 0));

        jSplitPane2.setDividerLocation(200);

        backupLeftScrollPane.setPreferredSize(new java.awt.Dimension(400, 150));

        backupsetLeftTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "", "Backupsets", "Files", "Size"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Boolean.class, java.lang.Object.class, java.lang.Object.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                true, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        backupsetLeftTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_ALL_COLUMNS);
        backupsetLeftTable.setMinimumSize(new java.awt.Dimension(0, 300));
        backupsetLeftTable.setPreferredSize(new java.awt.Dimension(100, 430));
        backupsetLeftTable.setShowHorizontalLines(false);
        backupsetLeftTable.setShowVerticalLines(false);
        backupsetLeftTable.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                backupsetLeftTableMouseClicked(evt);
            }
        });
        backupLeftScrollPane.setViewportView(backupsetLeftTable);
        backupsetLeftTable.getColumnModel().getColumn(2).setPreferredWidth(20);
        backupsetLeftTable.getColumnModel().getColumn(3).setPreferredWidth(20);

        jSplitPane2.setLeftComponent(backupLeftScrollPane);

        bacupsetViewFileTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "", "Name", "In Folder", "Size", "Data Modified"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Boolean.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class
            };
            boolean[] canEdit = new boolean [] {
                true, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        bacupsetViewFileTable.setMinimumSize(new java.awt.Dimension(0, 300));
        bacupsetViewFileTable.setRowHeight(20);
        bacupsetViewFileTable.setShowHorizontalLines(false);
        bacupsetViewFileTable.setShowVerticalLines(false);
        backupRightScrollPane.setViewportView(bacupsetViewFileTable);

        jSplitPane2.setRightComponent(backupRightScrollPane);

        backupPanel.add(jSplitPane2);

        displayPanel.add(backupPanel, "card3");

        optionPanel.setPreferredSize(new java.awt.Dimension(700, 400));
        optionPanel.setLayout(new java.awt.GridLayout(1, 0));

        optionTabbedPane.setPreferredSize(new java.awt.Dimension(800, 400));
        optionTabbedPane.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                optionTabbedPaneMouseClicked(evt);
            }
        });

        generalPanel.setBackground(new java.awt.Color(255, 255, 255));

        backupStatusCheckBox.setBackground(new java.awt.Color(255, 255, 255));
        backupStatusCheckBox.setText("Show backup status icon on files  and folders"); // NOI18N
        backupStatusCheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                backupStatusCheckBoxActionPerformed(evt);
            }
        });

        warnCheckBox.setBackground(new java.awt.Color(255, 255, 255));
        warnCheckBox.setText("warn me when I go over my quota"); // NOI18N
        warnCheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                warnCheckBoxActionPerformed(evt);
            }
        });

        alertSpinner.setModel(new javax.swing.SpinnerNumberModel(0, 0, 30, 1));
        alertSpinner.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                alertSpinnerStateChanged(evt);
            }
        });

        alertLabel.setText("Alert me that a backup hasn't happened in this many days ."); // NOI18N
        alertLabel.addContainerListener(new java.awt.event.ContainerAdapter() {
            public void componentRemoved(java.awt.event.ContainerEvent evt) {
                alertLabelComponentRemoved(evt);
            }
        });

        javax.swing.GroupLayout generalPanelLayout = new javax.swing.GroupLayout(generalPanel);
        generalPanel.setLayout(generalPanelLayout);
        generalPanelLayout.setHorizontalGroup(
            generalPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(generalPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(generalPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(generalPanelLayout.createSequentialGroup()
                        .addComponent(alertSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(alertLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 5869, Short.MAX_VALUE))
                    .addGroup(generalPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(warnCheckBox, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(backupStatusCheckBox, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap())
        );
        generalPanelLayout.setVerticalGroup(
            generalPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(generalPanelLayout.createSequentialGroup()
                .addGap(27, 27, 27)
                .addComponent(backupStatusCheckBox)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(warnCheckBox)
                .addGap(11, 11, 11)
                .addGroup(generalPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(alertSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(alertLabel))
                .addContainerGap(1321, Short.MAX_VALUE))
        );

        optionTabbedPane.addTab("General", generalPanel);

        performancePanel.setBackground(new java.awt.Color(255, 255, 255));
        performancePanel.setPreferredSize(new java.awt.Dimension(83, 372));

        throttlingPanel.setBackground(new java.awt.Color(255, 255, 255));
        throttlingPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Throttling Parameters"));

        limitLabel.setText("Limit how much of your Internet Connection is used"); // NOI18N

        enableCheckBox.setBackground(new java.awt.Color(255, 255, 255));
        enableCheckBox.setLabel("Enable BandWidth Throttle "); // NOI18N
        enableCheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                enableCheckBoxActionPerformed(evt);
            }
        });

        throttleRadioButton.setBackground(new java.awt.Color(255, 255, 255));
        throttleRadioButton.setEnabled(false);
        throttleRadioButton.setLabel("Always Throttle"); // NOI18N
        throttleRadioButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                throttleRadioButtonActionPerformed(evt);
            }
        });

        throttlehrsRadioButton.setBackground(new java.awt.Color(255, 255, 255));
        throttlehrsRadioButton.setEnabled(false);
        throttlehrsRadioButton.setLabel("Throttle Between these Hours"); // NOI18N
        throttlehrsRadioButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                throttlehrsRadioButtonActionPerformed(evt);
            }
        });

        enableSlider.setBackground(new java.awt.Color(255, 255, 255));
        enableSlider.setMaximum(1024);
        enableSlider.setMinorTickSpacing(10);
        enableSlider.setPaintTicks(true);
        enableSlider.setEnabled(false);
        enableSlider.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                enableSliderStateChanged(evt);
            }
        });

        timefromLabel.setText("From"); // NOI18N

        timefromSpinner.setModel(new javax.swing.SpinnerNumberModel(0, 0, 24, 1));
        timefromSpinner.setEnabled(false);

        Timetolabel.setText("to"); // NOI18N

        timetoSpinner.setModel(new javax.swing.SpinnerNumberModel(0, 0, 24, 1));
        timetoSpinner.setEnabled(false);

        capacityLabel.setText("256.0 kbps"); // NOI18N

        javax.swing.GroupLayout throttlingPanelLayout = new javax.swing.GroupLayout(throttlingPanel);
        throttlingPanel.setLayout(throttlingPanelLayout);
        throttlingPanelLayout.setHorizontalGroup(
            throttlingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(throttlingPanelLayout.createSequentialGroup()
                .addGroup(throttlingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(throttlingPanelLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(throttlingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(limitLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 301, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(throttlingPanelLayout.createSequentialGroup()
                                .addGap(240, 240, 240)
                                .addComponent(capacityLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(throttleRadioButton)
                            .addComponent(throttlehrsRadioButton)))
                    .addGroup(throttlingPanelLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(enableCheckBox, javax.swing.GroupLayout.PREFERRED_SIZE, 231, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(throttlingPanelLayout.createSequentialGroup()
                        .addGap(120, 120, 120)
                        .addComponent(enableSlider, javax.swing.GroupLayout.PREFERRED_SIZE, 297, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(throttlingPanelLayout.createSequentialGroup()
                        .addGap(25, 25, 25)
                        .addComponent(timefromLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(timefromSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(Timetolabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(timetoSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(1234, Short.MAX_VALUE))
        );
        throttlingPanelLayout.setVerticalGroup(
            throttlingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(throttlingPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(limitLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(enableCheckBox)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(enableSlider, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(343, 343, 343)
                .addComponent(throttleRadioButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(throttlehrsRadioButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(throttlingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(timefromSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(timefromLabel)
                    .addComponent(Timetolabel)
                    .addComponent(timetoSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
            .addGroup(throttlingPanelLayout.createSequentialGroup()
                .addGap(90, 90, 90)
                .addComponent(capacityLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        jPanel6.setBackground(new java.awt.Color(255, 255, 255));
        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder("Backup Speed"));

        jLabel3.setText("Backup speed impacts your PC and Internet Performance."); // NOI18N

        jLabel4.setText("Move the slider to change the backup speed until you find the optimal balance."); // NOI18N

        jLabel5.setText("Faster Computer"); // NOI18N

        jLabel6.setText("Quicker Backups"); // NOI18N

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addComponent(jLabel5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jSlider1, javax.swing.GroupLayout.PREFERRED_SIZE, 301, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jLabel6))
                    .addComponent(jLabel3)
                    .addComponent(jLabel4))
                .addContainerGap(1161, Short.MAX_VALUE))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addComponent(jLabel3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel4)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel6)
                    .addComponent(jLabel5)
                    .addComponent(jSlider1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(120, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout performancePanelLayout = new javax.swing.GroupLayout(performancePanel);
        performancePanel.setLayout(performancePanelLayout);
        performancePanelLayout.setHorizontalGroup(
            performancePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, performancePanelLayout.createSequentialGroup()
                .addGap(26, 26, 26)
                .addGroup(performancePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(throttlingPanel, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(4245, 4245, 4245))
        );
        performancePanelLayout.setVerticalGroup(
            performancePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(performancePanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(throttlingPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(638, Short.MAX_VALUE))
        );

        optionTabbedPane.addTab("Performance", performancePanel);

        Scheduling.setBackground(new java.awt.Color(255, 255, 255));

        autobackupRadioButton.setBackground(new java.awt.Color(255, 255, 255));
        autobackupRadioButton.setLabel("Automatic(Perform backups when your computer is not in use)"); // NOI18N
        autobackupRadioButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                autobackupRadioButtonActionPerformed(evt);
            }
        });

        automaticparametersPanel.setBackground(new java.awt.Color(255, 255, 255));
        automaticparametersPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Automatic Parameters"));

        CPUstatusSpinner.setModel(new javax.swing.SpinnerNumberModel(0, 0, 100, 1));
        CPUstatusSpinner.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                CPUstatusSpinnerStateChanged(evt);
            }
        });

        CPUidleSpinner.setModel(new javax.swing.SpinnerNumberModel(Integer.valueOf(0), Integer.valueOf(0), null, Integer.valueOf(1)));
        CPUidleSpinner.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                CPUidleSpinnerStateChanged(evt);
            }
        });

        NumoftimeSpinner.setModel(new javax.swing.SpinnerNumberModel(Integer.valueOf(0), Integer.valueOf(0), null, Integer.valueOf(1)));
        NumoftimeSpinner.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                NumoftimeSpinnerStateChanged(evt);
            }
        });

        CPUstatusLabel.setText("Don't backup if the CPU is over this  % busy"); // NOI18N

        CPUidleLabel.setText("Don't backup unless Computer has been idle for atleast this long (minutes)"); // NOI18N

        numoftimesLabel.setText("Don't backup this more than this times per day"); // NOI18N

        javax.swing.GroupLayout automaticparametersPanelLayout = new javax.swing.GroupLayout(automaticparametersPanel);
        automaticparametersPanel.setLayout(automaticparametersPanelLayout);
        automaticparametersPanelLayout.setHorizontalGroup(
            automaticparametersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(automaticparametersPanelLayout.createSequentialGroup()
                .addGroup(automaticparametersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(CPUstatusSpinner, javax.swing.GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE)
                    .addComponent(CPUidleSpinner)
                    .addComponent(NumoftimeSpinner))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(automaticparametersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(CPUstatusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 299, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(CPUidleLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 466, Short.MAX_VALUE)
                    .addComponent(numoftimesLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 317, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        automaticparametersPanelLayout.setVerticalGroup(
            automaticparametersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(automaticparametersPanelLayout.createSequentialGroup()
                .addGroup(automaticparametersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(CPUstatusSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(CPUstatusLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(automaticparametersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(CPUidleSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(CPUidleLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(automaticparametersPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(NumoftimeSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(numoftimesLabel)))
        );

        schedulebackuptimeRadioButton.setBackground(new java.awt.Color(255, 255, 255));
        schedulebackuptimeRadioButton.setLabel("Scheduled(perform backups at a time of your choice)"); // NOI18N
        schedulebackuptimeRadioButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                schedulebackuptimeRadioButtonActionPerformed(evt);
            }
        });

        scheulePanel.setBackground(new java.awt.Color(255, 255, 255));
        scheulePanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Scheduled Parameter"));

        scheduleComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Daily", "Weekly" }));
        scheduleComboBox.setEnabled(false);
        scheduleComboBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                scheduleComboBoxActionPerformed(evt);
            }
        });

        backupLabel.setText("Back up at"); // NOI18N

        backuptimeSpinner.setModel(new javax.swing.SpinnerNumberModel(0, 0, 23, 1));
        backuptimeSpinner.setEnabled(false);
        backuptimeSpinner.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                backuptimeSpinnerStateChanged(evt);
            }
        });

        daySpinner.setModel(new javax.swing.SpinnerNumberModel(1, 1, 7, 1));
        daySpinner.setEnabled(false);
        daySpinner.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                daySpinnerStateChanged(evt);
            }
        });

        dayLabel.setText("every"); // NOI18N

        daysLabel.setText("days"); // NOI18N

        onDayCombo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Sunday\t", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" }));
        onDayCombo.setEnabled(false);
        onDayCombo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                onDayComboActionPerformed(evt);
            }
        });

        OnLabel.setText("on"); // NOI18N

        HoursLabel.setText("hours"); // NOI18N

        javax.swing.GroupLayout scheulePanelLayout = new javax.swing.GroupLayout(scheulePanel);
        scheulePanel.setLayout(scheulePanelLayout);
        scheulePanelLayout.setHorizontalGroup(
            scheulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(scheulePanelLayout.createSequentialGroup()
                .addGap(30, 30, 30)
                .addGroup(scheulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(scheduleComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(dayLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(scheulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(scheulePanelLayout.createSequentialGroup()
                        .addComponent(daySpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(daysLabel))
                    .addGroup(scheulePanelLayout.createSequentialGroup()
                        .addComponent(backupLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(backuptimeSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(HoursLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(OnLabel)
                        .addGap(4, 4, 4)
                        .addComponent(onDayCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(147, 147, 147))
        );
        scheulePanelLayout.setVerticalGroup(
            scheulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(scheulePanelLayout.createSequentialGroup()
                .addGroup(scheulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(scheduleComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(backupLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(backuptimeSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(HoursLabel)
                    .addComponent(OnLabel)
                    .addComponent(onDayCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(scheulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(dayLabel)
                    .addComponent(daySpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(daysLabel)))
        );

        tempSuspendCheckBox.setBackground(new java.awt.Color(255, 255, 255));
        tempSuspendCheckBox.setText("Temporarily suspend automatic and scheduled backups."); // NOI18N
        tempSuspendCheckBox.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                tempSuspendCheckBoxStateChanged(evt);
            }
        });

        noNetworkCheckBox.setBackground(new java.awt.Color(255, 255, 255));
        noNetworkCheckBox.setText("Attempt automatic backup even when a network connection is not detected."); // NOI18N
        noNetworkCheckBox.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                noNetworkCheckBoxStateChanged(evt);
            }
        });

        autoBatteryBackCheckBox.setBackground(new java.awt.Color(255, 255, 255));
        autoBatteryBackCheckBox.setSelected(true);
        autoBatteryBackCheckBox.setText("Start automatic backups when the computer is running on battery power."); // NOI18N
        autoBatteryBackCheckBox.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                autoBatteryBackCheckBoxStateChanged(evt);
            }
        });

        javax.swing.GroupLayout SchedulingLayout = new javax.swing.GroupLayout(Scheduling);
        Scheduling.setLayout(SchedulingLayout);
        SchedulingLayout.setHorizontalGroup(
            SchedulingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(SchedulingLayout.createSequentialGroup()
                .addGroup(SchedulingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, SchedulingLayout.createSequentialGroup()
                        .addGap(24, 24, 24)
                        .addGroup(SchedulingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(schedulebackuptimeRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 360, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(autobackupRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 424, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(tempSuspendCheckBox)
                            .addComponent(noNetworkCheckBox)
                            .addComponent(autoBatteryBackCheckBox)))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, SchedulingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, SchedulingLayout.createSequentialGroup()
                            .addGap(42, 42, 42)
                            .addComponent(scheulePanel, javax.swing.GroupLayout.DEFAULT_SIZE, 554, Short.MAX_VALUE))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, SchedulingLayout.createSequentialGroup()
                            .addGap(37, 37, 37)
                            .addComponent(automaticparametersPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(5342, Short.MAX_VALUE))
        );
        SchedulingLayout.setVerticalGroup(
            SchedulingLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(SchedulingLayout.createSequentialGroup()
                .addGap(18, 18, 18)
                .addComponent(autobackupRadioButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(automaticparametersPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(schedulebackuptimeRadioButton)
                .addGap(16, 16, 16)
                .addComponent(scheulePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(tempSuspendCheckBox)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(noNetworkCheckBox)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(autoBatteryBackCheckBox)
                .addContainerGap(1085, Short.MAX_VALUE))
        );

        optionTabbedPane.addTab("Scheduling", Scheduling);

        advancedPanel.setBackground(new java.awt.Color(255, 255, 255));

        updateCheckBox.setBackground(new java.awt.Color(255, 255, 255));
        updateCheckBox.setLabel("Automatically upate the client software without prompting me"); // NOI18N
        updateCheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                updateCheckBoxActionPerformed(evt);
            }
        });

        virtualdriveCheckBox.setBackground(new java.awt.Color(255, 255, 255));
        virtualdriveCheckBox.setLabel("Show the virtual drive in my computer"); // NOI18N
        virtualdriveCheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                virtualdriveCheckBoxActionPerformed(evt);
            }
        });

        autoLogCheckBox.setBackground(new java.awt.Color(255, 255, 255));
        autoLogCheckBox.setText("Automaticallly log me in when opening the Configuration Window"); // NOI18N
        autoLogCheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                autoLogCheckBoxActionPerformed(evt);
            }
        });

        preConfigCheckBox.setBackground(new java.awt.Color(255, 255, 255));
        preConfigCheckBox.setText("Show all pre-configured backup sets"); // NOI18N
        preConfigCheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                preConfigCheckBoxActionPerformed(evt);
            }
        });

        adFeatureCheckBox.setBackground(new java.awt.Color(255, 255, 255));
        adFeatureCheckBox.setText("Show advanced backup set features"); // NOI18N
        adFeatureCheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                adFeatureCheckBoxActionPerformed(evt);
            }
        });

        shRestoreOptionCheckBox.setBackground(new java.awt.Color(255, 255, 255));
        shRestoreOptionCheckBox.setText("Show the restore option on the right-click menu in Windows Explorer"); // NOI18N
        shRestoreOptionCheckBox.setEnabled(false);
        shRestoreOptionCheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                shRestoreOptionCheckBoxActionPerformed(evt);
            }
        });

        enSupportOpenCheckBox.setBackground(new java.awt.Color(255, 255, 255));
        enSupportOpenCheckBox.setText("Enable support for backing up open files"); // NOI18N
        enSupportOpenCheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                enSupportOpenCheckBoxActionPerformed(evt);
            }
        });

        enSupportEFScheckBox.setBackground(new java.awt.Color(255, 255, 255));
        enSupportEFScheckBox.setText("Enable support for backing up EFS encrypted files"); // NOI18N
        enSupportEFScheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                enSupportEFScheckBoxActionPerformed(evt);
            }
        });

        shProtectedCheckBox.setBackground(new java.awt.Color(255, 255, 255));
        shProtectedCheckBox.setText("Show all protected Operating System files"); // NOI18N
        shProtectedCheckBox.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                shProtectedCheckBoxActionPerformed(evt);
            }
        });

        cofigureProxyBt.setText("Configure Proxy..."); // NOI18N
        cofigureProxyBt.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cofigureProxyBtActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout advancedPanelLayout = new javax.swing.GroupLayout(advancedPanel);
        advancedPanel.setLayout(advancedPanelLayout);
        advancedPanelLayout.setHorizontalGroup(
            advancedPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(advancedPanelLayout.createSequentialGroup()
                .addGap(21, 21, 21)
                .addGroup(advancedPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(cofigureProxyBt)
                    .addGroup(advancedPanelLayout.createSequentialGroup()
                        .addGap(21, 21, 21)
                        .addComponent(shRestoreOptionCheckBox))
                    .addComponent(virtualdriveCheckBox)
                    .addComponent(adFeatureCheckBox)
                    .addComponent(preConfigCheckBox)
                    .addComponent(autoLogCheckBox)
                    .addComponent(updateCheckBox, javax.swing.GroupLayout.PREFERRED_SIZE, 1622, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(enSupportOpenCheckBox)
                    .addComponent(enSupportEFScheckBox)
                    .addComponent(shProtectedCheckBox))
                .addContainerGap(4295, Short.MAX_VALUE))
        );
        advancedPanelLayout.setVerticalGroup(
            advancedPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(advancedPanelLayout.createSequentialGroup()
                .addGap(11, 11, 11)
                .addComponent(updateCheckBox)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(autoLogCheckBox)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(preConfigCheckBox)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(adFeatureCheckBox)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(virtualdriveCheckBox)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(shRestoreOptionCheckBox)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(enSupportOpenCheckBox)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(enSupportEFScheckBox)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(shProtectedCheckBox)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(cofigureProxyBt)
                .addContainerGap(1177, Short.MAX_VALUE))
        );

        optionTabbedPane.addTab("Advanced", advancedPanel);

        optionPanel.add(optionTabbedPane);

        displayPanel.add(optionPanel, "card5");

        historyPanel.setPreferredSize(new java.awt.Dimension(700, 400));
        historyPanel.setLayout(new java.awt.GridLayout(1, 0));

        historySplitPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);

        historyTopScrollpane.setMinimumSize(new java.awt.Dimension(105, 200));
        historyTopScrollpane.setOpaque(false);

        historyTopTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Start Time", "Type", "Duration", "Result", "Files", "Size", "File Transfer", "Size Transfer"
            }
        ));
        historyTopTable.setRowHeight(15);
        historyTopTable.setShowHorizontalLines(false);
        historyTopTable.setShowVerticalLines(false);
        historyTopTable.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                HistoryDetailRowSelected(evt);
            }
        });
        historyTopScrollpane.setViewportView(historyTopTable);

        historySplitPane.setLeftComponent(historyTopScrollpane);

        HistoryBottomScrollPane.setMinimumSize(new java.awt.Dimension(105, 200));

        historyBottomTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Start Time", "File Name", "File Path", "Size", "Transfer Time", "Transfer Rate", ""
            }
        ));
        historyBottomTable.setMinimumSize(new java.awt.Dimension(100, 205));
        historyBottomTable.setRowHeight(15);
        historyBottomTable.setShowHorizontalLines(false);
        historyBottomTable.setShowVerticalLines(false);
        HistoryBottomScrollPane.setViewportView(historyBottomTable);

        historySplitPane.setRightComponent(HistoryBottomScrollPane);

        historyPanel.add(historySplitPane);

        displayPanel.add(historyPanel, "card6");

        filesystemPanel.setPreferredSize(new java.awt.Dimension(700, 300));
        filesystemPanel.setLayout(new java.awt.GridLayout(1, 0));

        filesplitPanel.setMinimumSize(new java.awt.Dimension(296, 800));
        filesplitPanel.setPreferredSize(new java.awt.Dimension(800, 300));

        fileTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "", "Name", "InFolder", "Size"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Boolean.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class
            };
            boolean[] canEdit = new boolean [] {
                true, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        fileTable.setShowHorizontalLines(false);
        fileTable.setShowVerticalLines(false);
        fileTable.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                fileTableMouseClicked(evt);
            }
        });
        fileLeftScrollPane.setViewportView(fileTable);

        filesplitPanel.setRightComponent(fileLeftScrollPane);

        filetreePanel.setBackground(new java.awt.Color(255, 255, 255));
        filetreePanel.setAlignmentX(1.0F);
        filetreePanel.setAlignmentY(1.0F);
        filetreePanel.setAutoscrolls(true);
        filetreePanel.setMinimumSize(new java.awt.Dimension(211, 1000));
        filetreePanel.setLayout(new java.awt.GridLayout(1, 0));
        filesplitPanel.setLeftComponent(filetreePanel);

        filesystemPanel.add(filesplitPanel);

        displayPanel.add(filesystemPanel, "card6");

        welcomePanel.setBackground(new java.awt.Color(255, 255, 255));
        welcomePanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 153)));
        welcomePanel.setPreferredSize(new java.awt.Dimension(600, 300));
        welcomePanel.setLayout(new java.awt.BorderLayout());

        topDisplayPanel.setBackground(new java.awt.Color(255, 255, 255));
        topDisplayPanel.setAlignmentX(2.0F);
        topDisplayPanel.setLayout(new java.awt.GridLayout(1, 0));

        welcomeLabel.setBackground(new java.awt.Color(255, 255, 255));
        welcomeLabel.setText("welcome"); // NOI18N
        welcomeLabel.setAlignmentY(0.0F);
        topDisplayPanel.add(welcomeLabel);

        welcomePanel.add(topDisplayPanel, java.awt.BorderLayout.PAGE_START);

        LeftDisplayPanel.setBackground(new java.awt.Color(255, 255, 255));
        LeftDisplayPanel.setLayout(new java.awt.GridLayout(10, 1));

        whatPomLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        whatPomLabel.setText("s1"); // NOI18N
        whatPomLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                whatPomLabelMouseClicked(evt);
            }
        });
        LeftDisplayPanel.add(whatPomLabel);

        howBackLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        howBackLabel.setText("s2"); // NOI18N
        howBackLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                howBackLabelMouseClicked(evt);
            }
        });
        LeftDisplayPanel.add(howBackLabel);

        howRestoreLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        howRestoreLabel.setText("s3"); // NOI18N
        howRestoreLabel.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                howRestoreLabelMouseClicked(evt);
            }
        });
        LeftDisplayPanel.add(howRestoreLabel);

        welcomePanel.add(LeftDisplayPanel, java.awt.BorderLayout.WEST);

        RightDisplayPanel.setBackground(new java.awt.Color(255, 255, 255));
        RightDisplayPanel.setLayout(new java.awt.CardLayout());

        howBackContentLabel.setText("howback"); // NOI18N
        howBackContentLabel.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        RightDisplayPanel.add(howBackContentLabel, "card4");

        howRestoreContentLabel.setText("howrestore"); // NOI18N
        howRestoreContentLabel.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        RightDisplayPanel.add(howRestoreContentLabel, "card5");

        whatPomContentLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        whatPomContentLabel.setText("whatpom"); // NOI18N
        whatPomContentLabel.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        RightDisplayPanel.add(whatPomContentLabel, "card3");

        welcomePanel.add(RightDisplayPanel, java.awt.BorderLayout.CENTER);

        displayPanel.add(welcomePanel, "card2");

        restorePanel.setBackground(new java.awt.Color(255, 255, 255));
        restorePanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        restorePanel.setLayout(new java.awt.GridLayout(1, 0));

        jPanel5.setLayout(new java.awt.BorderLayout());

        jPanel1.setBackground(new java.awt.Color(255, 255, 255));

        jLabel1.setText("Search For"); // NOI18N

        searchButton.setText("Search"); // NOI18N
        searchButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                searchButtonActionPerformed(evt);
            }
        });

        searchRadioButton.setBackground(new java.awt.Color(255, 255, 255));
        searchRadioButton.setText("Search By Date(dd-mm-yyyy)"); // NOI18N
        searchRadioButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                searchRadioButtonMouseClicked(evt);
            }
        });
        searchRadioButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                searchRadioButtonActionPerformed(evt);
            }
        });

        DateCombo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31" }));
        DateCombo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                DateComboActionPerformed(evt);
            }
        });

        MonthCombo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12" }));
        MonthCombo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                MonthComboActionPerformed(evt);
            }
        });

        YearCombo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "2008", "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024", "2025", " " }));
        YearCombo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                YearComboActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(4, 4, 4)
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(searchText, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(searchButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(searchRadioButton, javax.swing.GroupLayout.PREFERRED_SIZE, 176, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(DateCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(MonthCombo, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(YearCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(5317, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(searchText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(searchButton)
                    .addComponent(searchRadioButton)
                    .addComponent(DateCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(MonthCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(YearCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel5.add(jPanel1, java.awt.BorderLayout.PAGE_START);

        jPanel2.setBackground(new java.awt.Color(255, 255, 255));
        jPanel2.setPreferredSize(new java.awt.Dimension(862, 291));
        jPanel2.setLayout(new java.awt.GridLayout(1, 0));

        jSplitPane1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204)));
        jSplitPane1.setDividerLocation(250);
        jSplitPane1.setPreferredSize(new java.awt.Dimension(639, 404));

        jPanel3.setBackground(new java.awt.Color(255, 255, 255));
        jPanel3.setPreferredSize(new java.awt.Dimension(180, 200));

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 249, Short.MAX_VALUE)
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1323, Short.MAX_VALUE)
        );

        jSplitPane1.setLeftComponent(jPanel3);

        RestoreRightTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "", "Name", "In Folder", "Size", "Type", "Date Modified"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Boolean.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class
            };
            boolean[] canEdit = new boolean [] {
                true, false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        RestoreRightTable.setMinimumSize(new java.awt.Dimension(300, 64));
        RestoreRightTable.setShowHorizontalLines(false);
        RestoreRightTable.setShowVerticalLines(false);
        RestoreRightTable.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                RestoreRightTableMouseClicked(evt);
            }
        });
        RestoreRightPane.setViewportView(RestoreRightTable);

        jSplitPane1.setRightComponent(RestoreRightPane);

        jPanel2.add(jSplitPane1);

        jPanel5.add(jPanel2, java.awt.BorderLayout.CENTER);

        jPanel4.setBackground(new java.awt.Color(255, 255, 255));

        jRadioButton3.setBackground(new java.awt.Color(255, 255, 255));
        jRadioButton3.setText("Overwrite existing files "); // NOI18N
        jRadioButton3.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jRadioButton3MouseClicked(evt);
            }
        });

        jRadioButton4.setBackground(new java.awt.Color(255, 255, 255));
        jRadioButton4.setText("Rename file if it already exists"); // NOI18N
        jRadioButton4.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jRadioButton4MouseClicked(evt);
            }
        });

        jButton2.setText("Browse.."); // NOI18N
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jButton3.setText("Restore Files"); // NOI18N
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        jLabel2.setText("Destination Folder :"); // NOI18N

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(folderText, javax.swing.GroupLayout.PREFERRED_SIZE, 167, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jButton2)
                .addGap(18, 18, 18)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jRadioButton4)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(jRadioButton3)
                        .addGap(18, 18, 18)
                        .addComponent(jButton3)))
                .addContainerGap(5303, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(folderText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton2)
                    .addComponent(jRadioButton3)
                    .addComponent(jButton3))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jRadioButton4)
                .addContainerGap(25, Short.MAX_VALUE))
        );

        jPanel5.add(jPanel4, java.awt.BorderLayout.PAGE_END);

        restorePanel.add(jPanel5);

        displayPanel.add(restorePanel, "card7");

        mainPanel.add(displayPanel, "card2");

        getContentPane().add(mainPanel, java.awt.BorderLayout.CENTER);

        logoPanel.setBackground(new java.awt.Color(255, 255, 255));

        logoLabel.setBackground(new java.awt.Color(255, 255, 255));
        logoLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/logo.png"))); // NOI18N

        javax.swing.GroupLayout logoPanelLayout = new javax.swing.GroupLayout(logoPanel);
        logoPanel.setLayout(logoPanelLayout);
        logoPanelLayout.setHorizontalGroup(
            logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(logoPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(logoLabel)
                .addContainerGap(5764, Short.MAX_VALUE))
        );
        logoPanelLayout.setVerticalGroup(
            logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(logoPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(logoLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 78, Short.MAX_VALUE)
                .addContainerGap())
        );

        getContentPane().add(logoPanel, java.awt.BorderLayout.PAGE_START);

        statusMainPanel.setLayout(new java.awt.GridLayout(2, 1));

        statusPanel.setLayout(new java.awt.GridLayout(1, 0));

        StatusButtonPanel.setLayout(new javax.swing.BoxLayout(StatusButtonPanel, javax.swing.BoxLayout.LINE_AXIS));

        raisequotaButton.setText("Increase Quota"); // NOI18N

        ProgressBar.setToolTipText("Progress Bar"); // NOI18N
        ProgressBar.setAutoscrolls(true);
        ProgressBar.setDoubleBuffered(true);
        ProgressBar.setOpaque(true);
        ProgressBar.setStringPainted(true);

        javax.swing.GroupLayout ProgressBarPanelLayout = new javax.swing.GroupLayout(ProgressBarPanel);
        ProgressBarPanel.setLayout(ProgressBarPanelLayout);
        ProgressBarPanelLayout.setHorizontalGroup(
            ProgressBarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(ProgressBarPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(raisequotaButton)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(ProgressBar, javax.swing.GroupLayout.PREFERRED_SIZE, 460, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(5351, Short.MAX_VALUE))
        );
        ProgressBarPanelLayout.setVerticalGroup(
            ProgressBarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, ProgressBarPanelLayout.createSequentialGroup()
                .addContainerGap(16, Short.MAX_VALUE)
                .addGroup(ProgressBarPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(raisequotaButton)
                    .addComponent(ProgressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        StatusButtonPanel.add(ProgressBarPanel);

        saveButton.setText("Save"); // NOI18N
        saveButton.setAlignmentX(0.5F);
        saveButton.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
        saveButton.setPreferredSize(new java.awt.Dimension(70, 35));
        saveButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                saveButtonActionPerformed(evt);
            }
        });
        StatusButtonPanel.add(saveButton);

        cancelButton.setText("Cancel"); // NOI18N
        cancelButton.setPreferredSize(new java.awt.Dimension(70, 35));
        cancelButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cancelButtonActionPerformed(evt);
            }
        });
        StatusButtonPanel.add(cancelButton);

        statusPanel.add(StatusButtonPanel);

        statusMainPanel.add(statusPanel);

        detailPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        detailPanel.setPreferredSize(new java.awt.Dimension(700, 50));
        detailPanel.setLayout(new javax.swing.BoxLayout(detailPanel, javax.swing.BoxLayout.LINE_AXIS));

        Quota_label.setText("Quota: "); // NOI18N
        Quota_label.setPreferredSize(new java.awt.Dimension(15, 14));
        detailPanel.add(Quota_label);

        QuotaDisplayLabel.setText("                                     "); // NOI18N
        QuotaDisplayLabel.setMaximumSize(new java.awt.Dimension(150, 14));
        QuotaDisplayLabel.setMinimumSize(new java.awt.Dimension(150, 14));
        QuotaDisplayLabel.setPreferredSize(new java.awt.Dimension(150, 14));
        detailPanel.add(QuotaDisplayLabel);

        Used_label.setText("Used: "); // NOI18N
        Used_label.setMinimumSize(new java.awt.Dimension(15, 14));
        detailPanel.add(Used_label);

        UsedDisplayLabel.setText("                                        "); // NOI18N
        UsedDisplayLabel.setMaximumSize(new java.awt.Dimension(175, 14));
        UsedDisplayLabel.setMinimumSize(new java.awt.Dimension(175, 14));
        UsedDisplayLabel.setPreferredSize(new java.awt.Dimension(175, 14));
        detailPanel.add(UsedDisplayLabel);

        Remaining_label.setText("Remaining: "); // NOI18N
        Remaining_label.setMinimumSize(new java.awt.Dimension(20, 14));
        detailPanel.add(Remaining_label);

        RemainingDisplayLabel.setText("                                                   "); // NOI18N
        RemainingDisplayLabel.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING);
        RemainingDisplayLabel.setMaximumSize(new java.awt.Dimension(200, 14));
        RemainingDisplayLabel.setMinimumSize(new java.awt.Dimension(200, 14));
        RemainingDisplayLabel.setPreferredSize(new java.awt.Dimension(200, 14));
        detailPanel.add(RemainingDisplayLabel);

        File_label.setText("Files: "); // NOI18N
        detailPanel.add(File_label);

        FileDisplayLabel.setText("                    "); // NOI18N
        detailPanel.add(FileDisplayLabel);

        statusMainPanel.add(detailPanel);

        getContentPane().add(statusMainPanel, java.awt.BorderLayout.PAGE_END);

        menuPanel.setPreferredSize(new java.awt.Dimension(600, 100));
        menuPanel.setLayout(null);

        welcomeButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/first.png"))); // NOI18N
        welcomeButton.setMargin(new java.awt.Insets(0, 0, 0, 0));
        welcomeButton.setPreferredSize(new java.awt.Dimension(90, 75));
        welcomeButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                welcomeButtonActionPerformed(evt);
            }
        });
        menuPanel.add(welcomeButton);
        welcomeButton.setBounds(0, 0, 100, 70);

        backupsetsButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/backupsets.png"))); // NOI18N
        backupsetsButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                backupsetsButtonActionPerformed(evt);
            }
        });
        menuPanel.add(backupsetsButton);
        backupsetsButton.setBounds(0, 70, 100, 70);

        filesystemButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/filesystem.png"))); // NOI18N
        filesystemButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                filesystemButtonActionPerformed(evt);
            }
        });
        menuPanel.add(filesystemButton);
        filesystemButton.setBounds(0, 134, 100, 70);

        optionsButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/options1.png"))); // NOI18N
        optionsButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                optionsButtonActionPerformed(evt);
            }
        });
        menuPanel.add(optionsButton);
        optionsButton.setBounds(0, 200, 100, 70);

        historyButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/history.png"))); // NOI18N
        historyButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                historyButtonMouseClicked(evt);
            }
        });
        historyButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                historyButtonActionPerformed(evt);
            }
        });
        menuPanel.add(historyButton);
        historyButton.setBounds(0, 264, 100, 70);

        Restore_bt.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/restore.png"))); // NOI18N
        Restore_bt.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                RestoreButtonMouseClicked(evt);
            }
        });
        Restore_bt.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                Restore_btActionPerformed(evt);
            }
        });
        menuPanel.add(Restore_bt);
        Restore_bt.setBounds(0, 330, 100, 70);

        javax.swing.GroupLayout mainMenuPanelLayout = new javax.swing.GroupLayout(mainMenuPanel);
        mainMenuPanel.setLayout(mainMenuPanelLayout);
        mainMenuPanelLayout.setHorizontalGroup(
            mainMenuPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainMenuPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(menuPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        mainMenuPanelLayout.setVerticalGroup(
            mainMenuPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(mainMenuPanelLayout.createSequentialGroup()
                .addComponent(menuPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 425, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(1031, Short.MAX_VALUE))
        );

        getContentPane().add(mainMenuPanel, java.awt.BorderLayout.LINE_END);

        pack();
    }// </editor-fold>//GEN-END:initComponents
/*code to perform action on click of welcomeButton*/
    private void welcomeButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_welcomeButtonActionPerformed
        // TODO add your handling code here:
        selectedButton = "WelcomeButton";
        //Overview Of PomBlast
        welcomePanel.setVisible(true);

        //Select data for backup by filetypes
        backupPanel.setVisible(false);

        //Select specific directories & files for backup
        filesystemPanel.setVisible(false);

        //Configure backupoptions and set your computerspeed for backups
        optionPanel.setVisible(false);

        //View a list of attempted backups and restores an details about each
        historyPanel.setVisible(false);

        restorePanel.setVisible(false);
        StatusButtonPanel.setVisible(true);
        raisequotaButton.setVisible(false);
        ProgressBar.setVisible(false);
        // saveButton.setVisible(true);
        // cancelButton.setVisible(true);

        String welcomeMsg = "<html><body>"
                + "<div style=\"height:60px;width:100%;margin-left:auto;margin-right:auto;\">"
                + "<div style=\"width:100%;height:60px;float:left;\">"
                + "<div style=\"margin-top:10px; margin-left:35px;font:Verdana, Geneva, sans-serif;font-size:24px;color:#FF9A00;\">"
                + "<p style=\"margin:0;padding:0;\">Welcome to " + projectName + "</p></div>"
                + "<div style=\"margin-top:5px; margin-left:35px;font:Verdana, Geneva, sans-serif;font-size:12px;color:#333;line-height:5px;\"><p style=\"margin:0;padding:0;\">The following provides a brief overview of the " + projectName + " online backup service.</p></div>"
                + //     "<div style=\"height:1px;;width:100%;background-color:#666;margin-top:15px;\">.</div>"+
                " </div>"
                + "</body>"
                + "</html>";

//        String welcomeMsg="<html>"
//                + "<body>"
//                + "<b>"
//                + "<font color=#FF9A00 ><h2>Welcome to Pomblast</h2>"
//                + "</font>"
//                + "</b>"
//                + "</body>"
//                + "</html>";



        String whatPom = "<html><body><p>"
                + "<div><h4>" + projectName + " is an online backup and recovery service that allows you to select which"
                + " files you want to back up. In the case of file corruption, accidental deletion or"
                + " hardware failure, you may restore your backed up files to the original computer or"
                + " to another computer.<br><br>"
                + "Please note that " + projectName + " is not a file sharing or achiving service."
                + " Because " + projectName + " intended as a backup solution, as you delete files from your computer"
                + " they are also deleted from the " + projectName + " data centers after 30 days.<br><br>"
                + "Depending upon the size of your initial back up it could take several days to complete"
                + " your first back up. However " + projectName + " has finished its initial upload of your"
                + " selected files, it only backs up the parts of the files that have changed since your last"
                + " successful backup.</h4> </div>"
                + "</p></body>"
                + "</html>";

        String howBack = "<html><body>"
                + "<div><p><h4> There are two ways of selecting files for backup: selecting backup sets and selecting individual files.<br><br>"
                + " Backup sets are a grouping of files. For example: The Music Backup Set automatically"
                + " backsup all files with music extensions, such as .mp3. To select files for backup by their file type,"
                + " use the Backup Sets tab.<br><br>"
                + " " + projectName + " also allows to select individual files and folders for backup. To select individual files and folders use the File System tab.<br><br>"
                + " If you have selected backup sets and folders, " + projectName + " automatically backs up any new files"
                + " that match the backup sets or added to any selected folders. "
                + "</h4></p></div>"
                + "</body>"
                + "</html>";

        String howRestore = "<html><body>"
                + "<div><p><h4>"
                + " In the event that you need to restore data, there are multiple ways to do so. The two most common ways"
                + " of restoring data are in the " + projectName + " client and  a Web restore.<br><br>"
                + " Once you first successful backup has occured, the restore tab appears allowing you to select "
                + " backup sets and individual files and folders to restore. You can also select the backup date "
                + " from which you want to restore your files.<br><br>"
                + " " + projectName + " suggests using the Restore tab to perform most restores, and the Web Restore to restore large amounts of data. </h4></p></div>"
                + "</body>"
                + "</html>";

        String whatPomMsg = "<html><body>"
                + "<div style=\"width:auto;height:auto;margin-left:0;margin-right:auto;margin-top:5px;font-family:Verdana, Geneva, sans-serif;"
                + " color:#006dce;margin-left:35px;\"><h3>What is " + projectName + "?</h3></div>"
                + "</body</html>";


        String howBackMsg = "<html><body>"
                + "<div style=\"width:auto;height:auto;margin-left:0;margin-right:auto;margin-top:5px;font-family:Verdana, Geneva, sans-serif;"
                + " color:#006dce;margin-left:35px;\"><h3>How to select files for back up.&nbsp &nbsp </h3></div>"
                + "</body</html>";


        String howRestoreMsg = "<html><body>"
                + "<div style=\"width:auto;height:auto;margin-left:0;margin-right:auto;margin-top:5px;font-family:Verdana, Geneva, sans-serif;"
                + " color:#006dce;margin-left:35px;\"><h3>How to restore files.</h3></div>"
                + "</body</html>";


        welcomeLabel.setText(welcomeMsg);
        whatPomLabel.setText(whatPomMsg);
        howBackLabel.setText(howBackMsg);
        howRestoreLabel.setText(howRestoreMsg);
        whatPomContentLabel.setText(whatPom);
        whatPomContentLabel.setVisible(true);
        howBackContentLabel.setText(howBack);
        howBackContentLabel.setVisible(false);
        howRestoreContentLabel.setText(howRestore);
        howRestoreContentLabel.setVisible(false);
    }//GEN-LAST:event_welcomeButtonActionPerformed

    /*code to perform action on click of backupsetButton*/
    private void backupsetsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_backupsetsButtonActionPerformed
        // TODO add your handling code here:s
        BackupSetView.getInstance().printBackSet();
        MainForm.backupsetLeftTable.updateUI();
        MainDialog.setUploadFrom("selectedFiles");
        selectedButton = "backupsetButton";
        backupPanel.setVisible(true);
        welcomePanel.setVisible(false);
        filesystemPanel.setVisible(false);
        optionPanel.setVisible(false);
        historyPanel.setVisible(false);
        raisequotaButton.setVisible(true);
        ProgressBar.setVisible(true);


    }//GEN-LAST:event_backupsetsButtonActionPerformed

    /*code to perform action on click of filesystemButton*/
    private void filesystemButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_filesystemButtonActionPerformed
        // TODO add your handling code here:
        TestFileTree.getSelectedNodes().clear();
        MainForm.setType("Manual");
        MainDialog.setUploadFrom("backupSet");
        selectedButton = "filesystemButton";
        backupPanel.setVisible(false);
        welcomePanel.setVisible(false);
        filesystemPanel.setVisible(true);
        optionPanel.setVisible(false);
        historyPanel.setVisible(false);
        raisequotaButton.setVisible(true);
        ProgressBar.setVisible(true);

    }//GEN-LAST:event_filesystemButtonActionPerformed
    /*code to perform action on click of optionsButton*/
    private void optionsButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_optionsButtonActionPerformed
        // TODO add your handling code here:
        selectedButton = "optionButton";
        XmlGeneralStore s = new XmlGeneralStore();
        s.ReadGeneralXml("genaralsettings.xml");
        backupStatusCheckBox.setSelected(s.getStatus());
        warnCheckBox.setSelected(s.getQuotaWarning());
        alertSpinner.setValue(s.getAlertDays());

        XmlPerformanceStore perform = new XmlPerformanceStore();
        perform.ReadGeneralXml("performancesettings.xml");
        enableCheckBox.setSelected(perform.getBandwidth());
        enableSlider.setEnabled(perform.getBandwidth());
        enableSlider.setValue(perform.getLimit());
        throttleRadioButton.setSelected(perform.getThrottle());
        throttlehrsRadioButton.setSelected(perform.getThrottlehour());
        timefromSpinner.setValue(perform.getThrottlefrom());
        timetoSpinner.setValue(perform.getThrottleto());

        XmlAdvancedStore advanced = new XmlAdvancedStore();
        advanced.ReadGeneralXml("advancedsettings.xml");
        updateCheckBox.setSelected(advanced.getUpdate());
        virtualdriveCheckBox.setSelected(advanced.getVirtualDrive());
        autoLogCheckBox.setSelected(advanced.getLog());

        XmlSchedulingStore scheduling = XmlSchedulingStore.getnstance();
        scheduling.ReadGeneralXml("schedulingsettings.xml");
        autobackupRadioButton.setSelected(scheduling.getAutomatic());
        scheduleComboBox.setSelectedItem(scheduling.getScheduling_Parameter());
        schedulebackuptimeRadioButton.setSelected(scheduling.getSchedulued_BackUp());
        CPUidleSpinner.setValue(scheduling.getIdle_Time());
        CPUstatusSpinner.setValue(scheduling.getCPU_WorkTime());
        NumoftimeSpinner.setValue(scheduling.getScheduling_BackUp_At());
        daySpinner.setValue(scheduling.getScheduling_BackUp_Days());
        backuptimeSpinner.setValue(scheduling.getBackUp_Times());

        backupPanel.setVisible(false);
        welcomePanel.setVisible(false);
        filesystemPanel.setVisible(false);
        optionPanel.setVisible(true);
        historyPanel.setVisible(false);
        raisequotaButton.setVisible(false);
        ProgressBar.setVisible(false);
        // daySpinner.setValue(1);
        // autobackupRadioButton.setSelected(true);
        daySpinner.setValue(schedulingOption.getScheduling_BackUp_Days());
        scheduleComboBox.setSelectedItem(schedulingOption.getScheduling_Parameter());
        // schedulingOption.setScheduling_BackUp_Days(scheduleBackDays);
        tempSuspendCheckBox.setVisible(false);
        noNetworkCheckBox.setVisible(false);
        autoBatteryBackCheckBox.setVisible(false);
        //  Status_sub_panel.setVisible(false);
    }//GEN-LAST:event_optionsButtonActionPerformed

    /*code to perform action on click of historyButton*/
    private void historyButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_historyButtonActionPerformed
        // TODO add your handling code here:
        selectedButton = "historyButton";
        backupPanel.setVisible(false);
        welcomePanel.setVisible(false);
        filesystemPanel.setVisible(false);
        optionPanel.setVisible(false);
        historyPanel.setVisible(true);
        raisequotaButton.setVisible(false);
        ProgressBar.setVisible(false);
        // Status_sub_panel.setVisible(false);
}//GEN-LAST:event_historyButtonActionPerformed

    private void alertLabelComponentRemoved(java.awt.event.ContainerEvent evt) {//GEN-FIRST:event_alertLabelComponentRemoved
        // TODO add your handling code here:
    }//GEN-LAST:event_alertLabelComponentRemoved

    //backupsetleftTable mouseclick event
    private void backupsetLeftTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_backupsetLeftTableMouseClicked

        DefaultTableModel model = (DefaultTableModel) MainForm.bacupsetViewFileTable.getModel();
        int row = model.getRowCount();
        for (int i = row - 1; i >= 0; i--) {
            model.removeRow(i);
        }
        if (backupsetLeftTable.getSelectedRow() != -1) {
            String filename = System.getProperty("user.home") + "\\" + backupsetLeftTable.getValueAt(backupsetLeftTable.getSelectedRow(), 1);
            boolean status = (Boolean) backupsetLeftTable.getValueAt(backupsetLeftTable.getSelectedRow(), 0);
            if (status) {
                backupSetFilesSize = backupSetFilesSize + getSelectedSizeFromFormatedString(backupsetLeftTable.getValueAt(backupsetLeftTable.getSelectedRow(), 3).toString());
                backupSetSelectedFiles = backupSetSelectedFiles + Integer.parseInt(backupsetLeftTable.getValueAt(backupsetLeftTable.getSelectedRow(), 2).toString());
            } else {
                backupSetFilesSize = backupSetFilesSize - getSelectedSizeFromFormatedString(backupsetLeftTable.getValueAt(backupsetLeftTable.getSelectedRow(), 3).toString());
                backupSetSelectedFiles = backupSetSelectedFiles - Integer.parseInt(backupsetLeftTable.getValueAt(backupsetLeftTable.getSelectedRow(), 2).toString());
            }
            try {
                Thread.sleep(300);
            } catch (Exception ex) {
            }
            File f = new File(filename);

            if (f.isFile()) // if f is FILE
            {
                Date dateModified = new Date(f.lastModified());
                Object[] obj = new Object[]{status, f.getName(), f.getAbsolutePath(), getFormatedFileSize(f.length()), dateModified.getDate() + "/" + (dateModified.getMonth() + 1) + "/" + (dateModified.getYear() + 1900)};
                model.addRow(obj);
            } else // if f is DIRECTORY
            {
                try {
                    HashMap files = new HashMap();
                    getFileName(f.getAbsolutePath(), files);
                    Object[] objArr = files.keySet().toArray();
                    int num = objArr.length;
                    for (int i = 0; i < num; i++) {
                        Date dateModified = new Date(new File(objArr[i].toString()).lastModified());
                        Object[] obj = new Object[]{status, new File(objArr[i].toString()).getName(), new File(objArr[i].toString()).getAbsolutePath(), getFormatedFileSize(new File(objArr[i].toString()).length()), dateModified.getDate() + "/" + (dateModified.getMonth() + 1) + "/" + (dateModified.getYear() + 1900)};
                        model.addRow(obj);
                    }

                } catch (Exception ex) {
                    ex.printStackTrace();
                }
            }
            System.out.println(backupSetFilesSize);
            long quota = (long) setting.getQuota() * 1024 * 1024 * 1024;
            int percentUsed = (int) (backupSetFilesSize * 100 / quota);
            MainForm.ProgressBar.setValue(percentUsed);
            MainForm.UsedDisplayLabel.setText("" + FormatedFileSize.getFormatedFileSize(backupSetFilesSize));
            MainForm.QuotaDisplayLabel.setText("" + setting.getQuota() + " GB");
            MainForm.RemainingDisplayLabel.setText("" + FormatedFileSize.getFormatedFileSize(quota - backupSetFilesSize));
            MainForm.FileDisplayLabel.setText("" + backupSetSelectedFiles);
        }
    }//GEN-LAST:event_backupsetLeftTableMouseClicked

    private String getFormatedFileSize(long filesize) {
        String size = "";
        if (filesize >= 1024 * 1024 * 1024) {
            size = String.valueOf(filesize / (1024 * 1024 * 1024)) + " " + "GB ";
            filesize = filesize % (1024 * 1024 * 1024);
        }
        if (filesize >= 1024 * 1024) {
            size = size + String.valueOf(filesize / (1024 * 1024)) + " " + "MB ";
            filesize = filesize % (1024 * 1024);
        }
        if (filesize >= 1024) {
            size = size + String.valueOf(filesize / (1024)) + " " + "KB ";
            filesize = filesize % (1024);
        }
        if (filesize > 0) {
            size = size + String.valueOf(filesize) + " " + "bytes";
        }
        return size;
    }
    private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
        // TODO add your handling code here:

        //   System.exit(0);//closing the frame
        this.dispose();//closing the frame only

    }//GEN-LAST:event_cancelButtonActionPerformed

    private void saveButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_saveButtonActionPerformed
        // TODO add your handling code here:
        // save general settings value in xml file generalsetting.xml
        if (selectedButton.equals("filesystemButton")) {
            int n = JOptionPane.showConfirmDialog(null, "Do You Want To Save?", projectName, JOptionPane.YES_NO_OPTION);
            if (n == 0) {
                new Thread() {

                    @Override
                    public void run() {
                        CreatXMLFile createXmlFileObject = new CreatXMLFile();
                        HashMap selectedNode = TestFileTree.getSelectedNodes();
                        Object[] objArr = selectedNode.keySet().toArray();
                        int len = objArr.length;
                        HashMap map = new HashMap();
                        for (int i = 0; i < len; i++) {
                            map.put(objArr[i].toString(), "false");
                        }
                        CreatXMLFile.writeXmlFile(System.getProperty("user.home") + "/" + projectName + "/FilesToUpload.xml", map);
                        MainDialog statusObj = MainDialog.getInstance();
                        statusObj.setVisible(true);
                    }
                }.start();

            }
        } else if (selectedButton.equals("backupsetButton") || selectedButton.equals("")) {
            int n = JOptionPane.showConfirmDialog(null, "Do You Want To Save?", projectName, JOptionPane.YES_NO_OPTION);
            if (n == 0) {
                new Thread() {
                    @Override
                    public void run() {
                        HashMap map = new HashMap();
                        DefaultTableModel model = (DefaultTableModel) MainForm.backupsetLeftTable.getModel();
                        int row = model.getRowCount();
                        for (int i = 0; i < row; i++) {
                            if ((Boolean) model.getValueAt(i, 0)) {
                                String filename = model.getValueAt(i, 1).toString();
                                getFileName(new File(System.getProperty("user.home")) + "/" + filename, map);
                            }
                        }
                        CreatXMLFile.writeXmlFile(new File(System.getProperty("user.home")) + "/" + projectName + "/BackUpSet.xml", map);
       //                        MainDialog statusObj = new MainDialog();
       //                        statusObj.setVisible(true);
                    }
                }.start();

            }
        } else if (selectedButton.equals("restoreButton")) {
            int len = table_RestoreInfo.length;
            HashMap map = new HashMap();
            for (int i = 0; i < len; i++) {
                map.put(table_RestoreInfo[i][0], false);
            }
            CreatXMLFile.writeXmlFile(System.getProperty("user.home") + "/" + projectName + "/Restore.xml", map);
        }

        if (optionTabbedPane.getSelectedIndex() == 0) {
            boolean status = false, warn = false;
            int alert;
            if (backupStatusCheckBox.isSelected() == true) {
                status = true;
            }
            if (warnCheckBox.isSelected() == true) {
                warn = true;
            }
            //get JSpinner value
            String alert1 = alertSpinner.getValue().toString();
            alert = Integer.parseInt(alert1);
            //call XmlGeneralStore class constucter
            XmlGeneralStore generals = new XmlGeneralStore();
            String filename = "genaralsettings.xml";
            generals.setStatus(status);
            generals.setQuotaWarning(warn);
            generals.setAlertDays(alert);
            try {
                generals.writeGeneralXml(filename);
            } catch (ParserConfigurationException ex) {
                Logger.LogText(ex.toString());
            }
        } else if (optionTabbedPane.getSelectedIndex() == 1) {
            // save performance settings value in xml file performancesetting.xml

            boolean bandwidth = false, throttle = false, throttlehour = false;
            int throttlefrom, throttleto, limit;
            if (enableCheckBox.isSelected() == true) {
                bandwidth = true;
            }
            if (throttleRadioButton.isSelected() == true) {
                throttle = true;
            }
            if (throttlehrsRadioButton.isSelected() == true) {
                throttlehour = true;
            }
            // get Jslider value
            limit = enableSlider.getValue();

            //get JSpinner value
            String throttlefromtemp = timefromSpinner.getValue().toString();
            throttlefrom = Integer.parseInt(throttlefromtemp);
            String throttletotemp = timetoSpinner.getValue().toString();
            throttleto = Integer.parseInt(throttletotemp);

            //call XmlPerformanceStore class constructer
            XmlPerformanceStore performance = new XmlPerformanceStore();
            String filename = "performancesettings.xml";
            performance.setBandwidth(bandwidth);
            performance.setLimit(limit);
            performance.setThrottle(throttle);
            performance.setThrottlefrom(throttlefrom);
            performance.setThrottlehour(throttlehour);
            performance.setThrottleto(throttleto);
            try {
                performance.writeGeneralXml(filename);
            } catch (ParserConfigurationException ex) {
                // Logger.getLogger(MainForm.class.getName()).log(Level.SEVERE, null, ex);
            }
        } else if (optionTabbedPane.getSelectedIndex() == 3) {

            // save advanced settings value in xml file advancedsetting.xml
            boolean update = false, virtual = false, log = false;

            if (updateCheckBox.isSelected() == true) {
                update = true;
            }
            if (virtualdriveCheckBox.isSelected() == true) {
                virtual = true;
            }
            if (autoLogCheckBox.isSelected() == true) {
                log = true;
            }
            //call XmlAdvancedStore class constructer
            XmlAdvancedStore advanced = new XmlAdvancedStore();
            advanced.setLog(log);
            advanced.setUpdate(update);
            advanced.setVirtualDrive(virtual);
            String filename = "advancedsettings.xml";
            try {
                advanced.writeGeneralXml(filename);
            } catch (ParserConfigurationException ex) {
                // Logger.getLogger(MainForm.class.getName()).log(Level.SEVERE, null, ex);
            }


        } else if (optionTabbedPane.getSelectedIndex() == 2) {
            // save scheduling settings value in xml file schedulingsetting.xml
            boolean auto_backup = false, scheduled = false;
            String schedul_parameter = "Daily";
            int cpu_work, idle_time, backup_times, schedul_back_at, schedul_back_days;

            if (autobackupRadioButton.isSelected() == true) {
                auto_backup = true;
            }
            if (scheduleComboBox.getSelectedIndex() == 1) {
                schedul_parameter = "Weekly";
            }
            if (schedulebackuptimeRadioButton.isSelected() == true) {
                scheduled = true;
            }
            //get JSpinner value
            String cpu_worktemp = CPUstatusSpinner.getValue().toString();
            cpu_work = Integer.parseInt(cpu_worktemp);
            String idle_timetemp = CPUidleSpinner.getValue().toString();
            idle_time = Integer.parseInt(idle_timetemp);
            String backup_timestemp = NumoftimeSpinner.getValue().toString();
            backup_times = Integer.parseInt(backup_timestemp);
            String schedul_back_attemp = backuptimeSpinner.getValue().toString();
            schedul_back_at = Integer.parseInt(schedul_back_attemp);
            String schedul_back_daystemp = daySpinner.getValue().toString();
            schedul_back_days = Integer.parseInt(schedul_back_daystemp);
            //call XmlSchedulingStore class constructer
            XmlSchedulingStore scheduling = XmlSchedulingStore.getnstance();
            scheduling.setAutomatic(auto_backup);
            scheduling.setCPU_WorkTime(cpu_work);
            scheduling.setIdle_Time(idle_time);
            scheduling.setBackUp_Times(backup_times);
            scheduling.setSelectedDay(onDayCombo.getSelectedItem().toString());
            scheduling.setSchedulued_BackUp(scheduled);
            scheduling.setScheduling_Parameter(schedul_parameter);
            scheduling.setScheduling_BackUp_At(schedul_back_at);
            scheduling.setScheduling_BackUp_Days(schedul_back_days);
            String filename = "schedulingsettings.xml";
            try {
                scheduling.writeGeneralXml(filename);
            } catch (ParserConfigurationException ex) {
                //  Logger.getLogger(MainForm.class.getName()).log(Level.SEVERE, null, ex);
            }

        }
        //  optionPanel.setVisible(false);

    }//GEN-LAST:event_saveButtonActionPerformed
    public void getFileName(String dirName, HashMap fileNames) {
        File file = new File("");
        File[] fileArr = new File[1];
        int i = 0;
        try {
            file = new File(dirName);
            fileArr = file.listFiles();
            if (fileArr != null) {
                int len = fileArr.length;
                for (i = 0; i < len; i++) {
                    if (fileArr[i].isFile()) {
                        fileNames.put(fileArr[i].getAbsolutePath(), false);
                    } else {
                        getFileName(fileArr[i].getAbsolutePath(), fileNames);
                    }
                }
            }

        } catch (Exception ex) {
            ex.printStackTrace();
            if (file.isFile()) {
                fileNames.put(file.getAbsolutePath(), false);
            }
        }
    }
    private void backupStatusCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_backupStatusCheckBoxActionPerformed
        // TODO add your handling code here:
        if (backupStatusCheckBox.isSelected() == true) {
            generalOption.setStatus(true);
        } else if (backupStatusCheckBox.isSelected() == false) {
            generalOption.setStatus(false);
        }

}//GEN-LAST:event_backupStatusCheckBoxActionPerformed

    private void updateCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_updateCheckBoxActionPerformed
        // TODO add your handling code here:

        if (updateCheckBox.isSelected() == true) {
            advanceOption.setUpdate(true);
        } else if (updateCheckBox.isSelected() == false) {
            advanceOption.setUpdate(false);
        }
    }//GEN-LAST:event_updateCheckBoxActionPerformed

    private void Restore_btActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_Restore_btActionPerformed
        // TODO add your handling code here:
        TestFileTree.getSelectedNodes().clear();
        selectedButton = "restoreButton";
        backupPanel.setVisible(false);
        welcomePanel.setVisible(false);
        filesystemPanel.setVisible(false);
        optionPanel.setVisible(false);
        historyPanel.setVisible(false);
        raisequotaButton.setVisible(false);
        ProgressBar.setVisible(false);
        restorePanel.setVisible(true);
    }//GEN-LAST:event_Restore_btActionPerformed

    private void enableCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_enableCheckBoxActionPerformed
        // TODO add your handling code here:

        if (enableCheckBox.isSelected() == false) {

            performanceOption.setBandwidth(true);
            enableSlider.setEnabled(false);
            enableSlider.setValue(0);
            throttleRadioButton.setEnabled(false);
            throttlehrsRadioButton.setEnabled(false);
            timefromSpinner.setEnabled(false);
            timetoSpinner.setEnabled(false);

            throttleRadioButton.setSelected(false);
            throttlehrsRadioButton.setSelected(false);
        } else {

            performanceOption.setBandwidth(false);
            enableSlider.setEnabled(true);
            throttleRadioButton.setEnabled(true);
            throttlehrsRadioButton.setEnabled(true);
        }
    }//GEN-LAST:event_enableCheckBoxActionPerformed

    private void throttleRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_throttleRadioButtonActionPerformed
        // TODO add your handling code here:

        throttlehrsRadioButton.setSelected(false);
        throttleRadioButton.setSelected(true);
        timefromSpinner.setEnabled(false);
        timetoSpinner.setEnabled(false);

    }//GEN-LAST:event_throttleRadioButtonActionPerformed

    private void throttlehrsRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_throttlehrsRadioButtonActionPerformed
        // TODO add your handling code here:

        throttlehrsRadioButton.setSelected(true);
        timefromSpinner.setEnabled(true);
        timetoSpinner.setEnabled(true);
        throttleRadioButton.setSelected(false);
    }//GEN-LAST:event_throttlehrsRadioButtonActionPerformed

    private void autobackupRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_autobackupRadioButtonActionPerformed
        // TODO add your handling code here:
        if (autobackupRadioButton.isSelected() == true) {
            onDayCombo.setEnabled(false);
            schedulingOption.setAutomatic(true);
            schedulingOption.setSchedulued_BackUp(false);
            schedulebackuptimeRadioButton.setSelected(false);
            backuptimeSpinner.setEnabled(false);
            daySpinner.setEnabled(false);
            scheduleComboBox.setEnabled(false);
            CPUstatusSpinner.setEnabled(true);
            CPUidleSpinner.setEnabled(true);
            NumoftimeSpinner.setEnabled(true);
        } else {
            schedulebackuptimeRadioButton.setSelected(true);
            backuptimeSpinner.setEnabled(true);
            daySpinner.setEnabled(true);
            scheduleComboBox.setEnabled(true);
            CPUstatusSpinner.setEnabled(false);
            CPUidleSpinner.setEnabled(false);
            NumoftimeSpinner.setEnabled(false);
            onDayCombo.setEnabled(true);
        }
    }//GEN-LAST:event_autobackupRadioButtonActionPerformed

    private void schedulebackuptimeRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_schedulebackuptimeRadioButtonActionPerformed
        // TODO add your handling code here:
        if (schedulebackuptimeRadioButton.isSelected() == true) {
            onDayCombo.setEnabled(true);
            schedulingOption.setSchedulued_BackUp(true);
            schedulingOption.setAutomatic(false);
            autobackupRadioButton.setSelected(false);
            backuptimeSpinner.setEnabled(true);
            daySpinner.setEnabled(true);
            scheduleComboBox.setEnabled(true);
            CPUstatusSpinner.setEnabled(false);
            CPUidleSpinner.setEnabled(false);
            NumoftimeSpinner.setEnabled(false);

        } else {
            onDayCombo.setEnabled(false);
            autobackupRadioButton.setSelected(true);
            backuptimeSpinner.setEnabled(false);
            daySpinner.setEnabled(false);
            scheduleComboBox.setEnabled(false);
            CPUstatusSpinner.setEnabled(true);
            CPUidleSpinner.setEnabled(true);
            NumoftimeSpinner.setEnabled(true);
        }
    }//GEN-LAST:event_schedulebackuptimeRadioButtonActionPerformed

    private void historyButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_historyButtonMouseClicked
        // TODO add your handling code here:
        new Thread() {

            @Override
            public void run() {
                DataBase_HistoryInfo object = new DataBase_HistoryInfo();
                TableModel table_HistoryInfo = object.get_HistoryInfo(SettingsXml.getUser());
                System.out.println(table_HistoryInfo.getRowCount());
                historyTopTable.setModel(table_HistoryInfo);

                //set the column header name
                String[] columnNames = {"Start Time", "Type", "Duration", "Result", "Files", "Size", "File Transfer", "Size Tranfer"};
                for (int i = 0; i < columnNames.length; i++) {
                    historyTopTable.getColumnModel().getColumn(i).setHeaderValue(columnNames[i]);
                }
            }
        }.start();


    }//GEN-LAST:event_historyButtonMouseClicked

    private void HistoryDetailRowSelected(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_HistoryDetailRowSelected
        // TODO add your handling code here:
        try {
            DefaultTableModel bottomTable = (DefaultTableModel) MainForm.historyBottomTable.getModel();
            int rows = bottomTable.getRowCount();
            for (int i = rows - 1; i >= 0; i--) {
                bottomTable.removeRow(i);
            }
            historyTopTable.getSelectedRow();

            int row_sel = historyTopTable.getSelectedRow();
            String col_Value = (String) historyTopTable.getValueAt(row_sel, 0);
            Databse_HistoryOnDate object = new Databse_HistoryOnDate();
            // System.out.println(col_Value);
            Object[][] tableRow_HistoryInfo = object.get_HistoryOnDate(SettingsXml.getUser(), col_Value);
            int len = tableRow_HistoryInfo.length;
            String[] columnNames = null;
            if (historyTopTable.getValueAt(row_sel, 1).toString().equals("Restore")) {
                columnNames = new String[]{"StartTime", "FileName", "FilePath", "Size", "Transfer Time", "TransferRate", "Restored To"};
            } else {
                columnNames = new String[]{"StartTime", "FileName", "FilePath", "Size", "Transfer Time", "TransferRate", "OtherDetails"};
            }
            for (int counter = 0; counter < len; counter++) {
                String file = tableRow_HistoryInfo[counter][1].toString();
                String fileName = file.substring(file.replace("\\", "/").lastIndexOf("/") + 1);
                String dirName = file.substring(0, file.replace("\\", "/").lastIndexOf("/"));
                long fileSize = Long.parseLong(tableRow_HistoryInfo[counter][2].toString());
                long transferTime = Long.parseLong(tableRow_HistoryInfo[counter][3].toString());
                String details = (tableRow_HistoryInfo[counter][5] == null) ? tableRow_HistoryInfo[counter][4].toString() : tableRow_HistoryInfo[counter][5].toString();
                float transferRate = 0;
                if (transferTime != 0) {
                    transferRate = (float) fileSize * 1000 / transferTime * 1024;
                }
                bottomTable.addRow(new Object[]{tableRow_HistoryInfo[counter][0], fileName, dirName, fileSize, transferTime, transferRate, details});
            }

            for (int i = 0; i < columnNames.length; i++) {
                historyBottomTable.getColumnModel().getColumn(i).setHeaderValue(columnNames[i]);
            }
        } catch (Exception e) {
            e.printStackTrace();
            //  System.out.println("History Details Row selected Error "+e);
        }

    }//GEN-LAST:event_HistoryDetailRowSelected

    private void enableSliderStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_enableSliderStateChanged
        // TODO add your handling code here:
        int es = enableSlider.getValue();
        performanceOption.setLimit(es);
        //    System.out.println("Enable Slider = "+es);

        //  System.out.println("Enable Slider = " + es);

        if (es == 0) {
            capacityLabel.setText("Don't Backup");
        } else if (es == 1024) {
            capacityLabel.setText("1 Mbps");
        } else {
            capacityLabel.setText(Integer.toString(es) + " kbps");
        }


    }//GEN-LAST:event_enableSliderStateChanged

    private void autoLogCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_autoLogCheckBoxActionPerformed
        // TODO add your handling code here:


        if (autoLogCheckBox.isSelected() == true) {
            advanceOption.setLog(true);
        } else if (autoLogCheckBox.isSelected() == false) {
            advanceOption.setLog(false);
        }

    }//GEN-LAST:event_autoLogCheckBoxActionPerformed

    private void virtualdriveCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_virtualdriveCheckBoxActionPerformed
        // TODO add your handling code here:
        if (virtualdriveCheckBox.isSelected() == true) {
            shRestoreOptionCheckBox.setEnabled(true);
            advanceOption.setVirtualDrive(true);
        } else if (virtualdriveCheckBox.isSelected() == false) {
            shRestoreOptionCheckBox.setEnabled(false);
            shRestoreOptionCheckBox.setSelected(false);
            advanceOption.setVirtualDrive(false);
        }
    }//GEN-LAST:event_virtualdriveCheckBoxActionPerformed

    private void cofigureProxyBtActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cofigureProxyBtActionPerformed
        // TODO add your handling code here:
        new ProxyServer(this, true).setVisible(true);
    }//GEN-LAST:event_cofigureProxyBtActionPerformed

    private void enSupportEFScheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_enSupportEFScheckBoxActionPerformed
        // TODO add your handling code here:
        if (enSupportEFScheckBox.isSelected() == true) {
            advanceOption.setEnSupEncrypt(true);
        } else if (enSupportEFScheckBox.isSelected() == false) {
            advanceOption.setEnSupEncrypt(false);
        }
    }//GEN-LAST:event_enSupportEFScheckBoxActionPerformed

    private void preConfigCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_preConfigCheckBoxActionPerformed
        // TODO add your handling code here:
        if (preConfigCheckBox.isSelected() == true) {
            advanceOption.setPreConfigBack(true);
        } else if (preConfigCheckBox.isSelected() == false) {
            advanceOption.setPreConfigBack(false);
        }


    }//GEN-LAST:event_preConfigCheckBoxActionPerformed

    private void shProtectedCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_shProtectedCheckBoxActionPerformed
        // TODO add your handling code here:

        if (shProtectedCheckBox.isSelected() == true) {
            advanceOption.setShowOSfile(true);
        } else if (shProtectedCheckBox.isSelected() == false) {
            advanceOption.setShowOSfile(false);
        }
    }//GEN-LAST:event_shProtectedCheckBoxActionPerformed

    private void RestoreButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_RestoreButtonMouseClicked
        // TODO add your handling code here:
        new Thread() {

            @Override
            public void run() {
                int n = RestoreRightTable.getRowCount();
                DefaultTableModel dt = (DefaultTableModel) RestoreRightTable.getModel();
                for (int i = n - 1; i >= 0; i--) {
                    dt.removeRow(i);
                }
                table_RestoreInfo = restoreObj.get_RestoreInfo(SettingsXml.getUser().toLowerCase().trim());
                TestFileTree testFileTreeObj = new TestFileTree(table_RestoreInfo);
                jPanel3.removeAll();
                jPanel3.add(testFileTreeObj);
                jPanel3.updateUI();
                String[] columnNames = {"", "Name", "In Folder", "Size", "Type", "Date Modified"};
                for (int i = 0; i < columnNames.length; i++) {
                    RestoreRightTable.getColumnModel().getColumn(i).setHeaderValue(columnNames[i]);
                }
            }
        }.start();

//          new Thread() {
//
//            @Override
//            public void run() {
//                table_RestoreInfo = restoreObj.get_RestoreInfo(SettingsXml.getUser().toLowerCase().trim());
//                TestFileTree testFileTreeObj = new TestFileTree(table_RestoreInfo);
//                jPanel3.add(testFileTreeObj);
//                jPanel3.repaint();
//            }
//        }.start();
    }//GEN-LAST:event_RestoreButtonMouseClicked

    private void warnCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_warnCheckBoxActionPerformed

        if (warnCheckBox.isSelected() == true) {
            generalOption.setQuotaWarning(true);
        } else if (warnCheckBox.isSelected() == false) {
            generalOption.setQuotaWarning(false);
        }
}//GEN-LAST:event_warnCheckBoxActionPerformed

    private void fileTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_fileTableMouseClicked
        DefaultTableModel model = (DefaultTableModel) fileTable.getModel();
        int selectedRow = fileTable.getSelectedRow();
        if (selectedRow != -1) {
            HashMap selectedNodes = TestFileTree.getSelectedNodes();
            String filepath = model.getValueAt(selectedRow, 2).toString().trim().toLowerCase().replace("\\", "/") + "/" + model.getValueAt(selectedRow, 1).toString().trim().toLowerCase().replace("\\", "/");
            String size = model.getValueAt(selectedRow, 3).toString().trim();
            if (!(((Boolean) model.getValueAt(selectedRow, 0)).booleanValue())) {
                selectedNodes.remove(filepath);
                TestFileTree.removeSelectedFileSize(getSelectedSizeFromFormatedString(size));
            } else {
                selectedNodes.put(filepath, getSelectedSizeFromFormatedString(size));
                TestFileTree.addSelectedFileSize(getSelectedSizeFromFormatedString(size));
            }
        }
    }//GEN-LAST:event_fileTableMouseClicked

    private long getSelectedSizeFromFormatedString(String filesize) {//1 GB 2 MB 4 KB 820 bytes
        long size = 0;
        if (filesize.contains("GB")) {
            size = (long) Float.parseFloat(filesize.substring(0, filesize.indexOf("GB")).trim()) * 1024 * 1024 * 1024;
            filesize = filesize.substring(filesize.indexOf("GB") + "GB".length()).trim();
        }
        if (filesize.contains("MB")) {
            size = size + (long) Float.parseFloat(filesize.substring(0, filesize.indexOf("MB")).trim()) * 1024 * 1024;
            filesize = filesize.substring(filesize.indexOf("MB") + "MB".length()).trim();
        }
        if (filesize.contains("KB")) {
            size = size + (long) Float.parseFloat(filesize.substring(0, filesize.indexOf("KB")).trim()) * 1024;
            filesize = filesize.substring(filesize.indexOf("KB") + "KB".length()).trim();
        }
        if (filesize.contains("bytes")) {
            size = size + (long) Float.parseFloat(filesize.substring(0, filesize.indexOf("bytes")).trim());
            filesize = filesize.substring(filesize.indexOf("bytes") + "bytes".length()).trim();
        }

        return size;
    }

    private void whatPomLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_whatPomLabelMouseClicked
        // TODO add your handling code here:
        howBackContentLabel.setVisible(false);
        howRestoreContentLabel.setVisible(false);
        whatPomContentLabel.setVisible(true);
    }//GEN-LAST:event_whatPomLabelMouseClicked

    private void howBackLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_howBackLabelMouseClicked
        // TODO add your handling code here:

        howRestoreContentLabel.setVisible(false);
        whatPomContentLabel.setVisible(false);
        howBackContentLabel.setVisible(true);
    }//GEN-LAST:event_howBackLabelMouseClicked

    private void howRestoreLabelMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_howRestoreLabelMouseClicked
        // TODO add your handling code here:
        howRestoreContentLabel.setVisible(true);
        whatPomContentLabel.setVisible(false);
        howBackContentLabel.setVisible(false);

    }//GEN-LAST:event_howRestoreLabelMouseClicked

    private void RestoreRightTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_RestoreRightTableMouseClicked
        DefaultTableModel model = (DefaultTableModel) RestoreRightTable.getModel();
        int selectedRow = RestoreRightTable.getSelectedRow();
        HashMap selectedNodes = TestFileTree.getSelectedNodes();
        String filepath = model.getValueAt(selectedRow, 2).toString().trim().toLowerCase().replace("\\", "/") + "/" + model.getValueAt(selectedRow, 1).toString().trim().toLowerCase().replace("\\", "/");
        if (!(((Boolean) model.getValueAt(selectedRow, 0)).booleanValue())) {
            selectedNodes.remove(filepath.toLowerCase().replace("\\", "/"));
        } else {
            selectedNodes.put(filepath.toLowerCase().replace("\\", "/"), Boolean.valueOf(false));
        }
    }//GEN-LAST:event_RestoreRightTableMouseClicked

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        new Thread() {

            public void run() {
                try {
                    System.out.println("Selected Files" + TestFileTree.getSelectedNodes().size());
                    uploadFileObj.downloadFile(TestFileTree.getSelectedNodes(), folderText.getText().trim(), jRadioButton4.isSelected());
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
            }
        }.start();
    }//GEN-LAST:event_jButton3ActionPerformed

    private void searchRadioButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_searchRadioButtonMouseClicked
        if (searchRadioButton.isSelected() == true) {
            DateCombo.setVisible(true);
            MonthCombo.setVisible(true);
            YearCombo.setVisible(true);
        } else {
            DateCombo.setVisible(false);
            MonthCombo.setVisible(false);
            YearCombo.setVisible(false);
        }
    }//GEN-LAST:event_searchRadioButtonMouseClicked

    private void jRadioButton3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jRadioButton3MouseClicked
        jRadioButton3.setSelected(true);
        jRadioButton4.setSelected(false);
    }//GEN-LAST:event_jRadioButton3MouseClicked

    private void jRadioButton4MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jRadioButton4MouseClicked
        jRadioButton3.setSelected(false);
        jRadioButton4.setSelected(true);
    }//GEN-LAST:event_jRadioButton4MouseClicked

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        JFileChooser fileChooser = new JFileChooser();
        fileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
        fileChooser.showOpenDialog(this);
        if (fileChooser.getSelectedFile() != null) {
            folderText.setText(fileChooser.getSelectedFile().getAbsolutePath());
        }
    }//GEN-LAST:event_jButton2ActionPerformed
    private void setScheduleSetting() {
        String storedSetting = XmlSchedulingStore.getStoredValue();
        if (storedSetting != null) {
            autobackupRadioButton.setSelected(Boolean.parseBoolean(storedSetting.split(" ")[0]));
            CPUstatusSpinner.setValue(Integer.parseInt(storedSetting.split(" ")[1]));
            CPUidleSpinner.setValue(Integer.parseInt(storedSetting.split(" ")[2]));
            NumoftimeSpinner.setValue(Integer.parseInt(storedSetting.split(" ")[3]));
            schedulebackuptimeRadioButton.setSelected(Boolean.parseBoolean(storedSetting.split(" ")[4]));
            scheduleComboBox.setSelectedItem(storedSetting.split(" ")[5]);
            backuptimeSpinner.setValue(Integer.parseInt(storedSetting.split(" ")[6]));
            onDayCombo.setSelectedItem(storedSetting.split(" ")[7]);
            daySpinner.setValue(Integer.parseInt(storedSetting.split(" ")[8]));
            if(Boolean.parseBoolean(storedSetting.split(" ")[4]))
            {
                if(storedSetting.split(" ")[5].equals("Daily"))
                {
                    onDayCombo.setVisible(false);
                }
                daySpinner.setEnabled(true);
                backuptimeSpinner.setEnabled(true);
                scheduleComboBox.setEnabled(true);
                autobackupRadioButton.setSelected(false);
                CPUstatusSpinner.setEnabled(false);
                CPUidleSpinner.setEnabled(false);
                NumoftimeSpinner.setEnabled(false);
            }else
            {
                daySpinner.setEnabled(false);
                backuptimeSpinner.setEnabled(false);
                autobackupRadioButton.setSelected(true);
                scheduleComboBox.setEnabled(false);                
                CPUstatusSpinner.setEnabled(true);
                CPUidleSpinner.setEnabled(true);
                NumoftimeSpinner.setEnabled(true);
            }
        }else
        {
           autobackupRadioButton.setSelected(true);
           schedulebackuptimeRadioButton.setSelected(false);
        }
    }
    private void searchButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchButtonActionPerformed
        int len = table_RestoreInfo.length;
        System.out.println(len);
        DefaultTableModel model = (DefaultTableModel) MainForm.RestoreRightTable.getModel();
        int totalRows = model.getRowCount();
        String fileNameToSearch = searchText.getText();
        for (int j = totalRows - 1; j >= 0; j--) // Deletes All the rows in the Tabl/*e
        {model.removeRow(j);}

        if (searchRadioButton.isSelected()) {
            for (int i = 0; i < len; i++) {
                String[] dateFromTable = table_RestoreInfo[i][3].toString().substring(0, table_RestoreInfo[i][3].toString().indexOf(" ")).split("-");
                Date dateSelected = new Date(Integer.parseInt(YearCombo.getSelectedItem().toString()), Integer.parseInt(MonthCombo.getSelectedItem().toString()) - 1, Integer.parseInt(DateCombo.getSelectedItem().toString()));
//                System.out.println(dateSelected);
//                Date dateToSearch=new Date(Integer.parseInt(dateFromTable[0]), Integer.parseInt(dateFromTable[1])-1, Integer.parseInt(dateFromTable[2]));
//                System.out.println(dateToSearch);
//                System.out.println(dateSelected.equals(dateToSearch));

                if (dateSelected.equals(new Date(Integer.parseInt(dateFromTable[0]), Integer.parseInt(dateFromTable[1]) - 1, Integer.parseInt(dateFromTable[2])))) {
                    model.addRow(new Object[]{false, table_RestoreInfo[i][0].toString().substring(table_RestoreInfo[i][0].toString().replace("\\", "/").lastIndexOf("/") + 1), table_RestoreInfo[i][0].toString().substring(0, table_RestoreInfo[i][0].toString().replace("\\", "/").lastIndexOf("/")), table_RestoreInfo[i][1], table_RestoreInfo[i][2], table_RestoreInfo[i][3]});
                }

            }
        } else {

            for (int i = 0; i < len; i++) {
                if (table_RestoreInfo[i][0].toString().toLowerCase().substring(table_RestoreInfo[i][0].toString().trim().replace("\\", "/").lastIndexOf("/") + 1).equals(fileNameToSearch)) {
                    model.addRow(new Object[]{false, fileNameToSearch, table_RestoreInfo[i][0].toString().substring(0, table_RestoreInfo[i][0].toString().replace("\\", "/").lastIndexOf("/")), table_RestoreInfo[i][1], table_RestoreInfo[i][2], table_RestoreInfo[i][3]});
                }
            }
        }
    }//GEN-LAST:event_searchButtonActionPerformed

    private void adFeatureCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_adFeatureCheckBoxActionPerformed
        // TODO add your handling code here:
        if (adFeatureCheckBox.isSelected() == true) {
            advanceOption.setAdvBack(true);
        } else if (adFeatureCheckBox.isSelected() == false) {
            advanceOption.setAdvBack(false);
        }

    }//GEN-LAST:event_adFeatureCheckBoxActionPerformed

    private void shRestoreOptionCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_shRestoreOptionCheckBoxActionPerformed
        // TODO add your handling code here:
        if (shRestoreOptionCheckBox.isSelected() == true) {
            advanceOption.setShowRestoreOpt(true);
        } else if (shRestoreOptionCheckBox.isSelected() == false) {
            advanceOption.setShowRestoreOpt(false);
        }
    }//GEN-LAST:event_shRestoreOptionCheckBoxActionPerformed

    private void enSupportOpenCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_enSupportOpenCheckBoxActionPerformed
        // TODO add your handling code here:
        if (enSupportOpenCheckBox.isSelected() == true) {
            advanceOption.setEnSupOpen(true);
        } else if (enSupportOpenCheckBox.isSelected() == false) {
            advanceOption.setEnSupOpen(false);
        }
    }//GEN-LAST:event_enSupportOpenCheckBoxActionPerformed

    private void alertSpinnerStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_alertSpinnerStateChanged
        // TODO add your handling code here:
        int alertDays = (Integer) alertSpinner.getValue();
        generalOption.setAlertDays(alertDays);

    }//GEN-LAST:event_alertSpinnerStateChanged

    private void CPUstatusSpinnerStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_CPUstatusSpinnerStateChanged
        // TODO add your handling code here:
        int cpuWork = (Integer) CPUstatusSpinner.getValue();
        schedulingOption.setCPU_WorkTime(cpuWork);

    }//GEN-LAST:event_CPUstatusSpinnerStateChanged

    private void CPUidleSpinnerStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_CPUidleSpinnerStateChanged
        // TODO add your handling code here:
        int idleTime = (Integer) CPUidleSpinner.getValue();
        schedulingOption.setIdle_Time(idleTime);

    }//GEN-LAST:event_CPUidleSpinnerStateChanged

    private void NumoftimeSpinnerStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_NumoftimeSpinnerStateChanged
        // TODO add your handling code here:
        int backupTimes = (Integer) NumoftimeSpinner.getValue();
        schedulingOption.setIdle_Time(backupTimes);
    }//GEN-LAST:event_NumoftimeSpinnerStateChanged

    private void daySpinnerStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_daySpinnerStateChanged
        // TODO add your handling code here:
        int scheduleBackDays = (Integer) daySpinner.getValue();
        schedulingOption.setScheduling_BackUp_Days(scheduleBackDays);

    }//GEN-LAST:event_daySpinnerStateChanged

    private void backuptimeSpinnerStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_backuptimeSpinnerStateChanged
        // TODO add your handling code here:
        int backupAt = (Integer) backuptimeSpinner.getValue();
        schedulingOption.setScheduling_BackUp_At(backupAt);
    }//GEN-LAST:event_backuptimeSpinnerStateChanged

    private void scheduleComboBoxActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_scheduleComboBoxActionPerformed
        // TODO add your handling code here:
        String schduleDayWeek = (String) scheduleComboBox.getSelectedItem();
        if (schduleDayWeek != null) {
            if (schduleDayWeek.equalsIgnoreCase("Daily")) {
                onDayCombo.setVisible(false);
                OnLabel.setVisible(false);
                daysLabel.setText("days");
                schedulingOption.setScheduling_Parameter(schduleDayWeek);
                System.out.println(schduleDayWeek);

            } else if (schduleDayWeek.equalsIgnoreCase("Weekly")) {
                onDayCombo.setVisible(true);
                OnLabel.setVisible(true);
                daysLabel.setText("weeks");
                schedulingOption.setScheduling_Parameter(schduleDayWeek);
                System.out.println(schduleDayWeek);
            }
        }

    }//GEN-LAST:event_scheduleComboBoxActionPerformed

    private void tempSuspendCheckBoxStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_tempSuspendCheckBoxStateChanged
        // TODO add your handling code here:

        if (tempSuspendCheckBox.isSelected() == true) {
            schedulingOption.setTempSuspend(true);
        } else if (tempSuspendCheckBox.isSelected() == false) {
            schedulingOption.setTempSuspend(false);
        }

    }//GEN-LAST:event_tempSuspendCheckBoxStateChanged

    private void noNetworkCheckBoxStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_noNetworkCheckBoxStateChanged
        // TODO add your handling code here:

        if (noNetworkCheckBox.isSelected() == true) {
            schedulingOption.setNoNetBackup(true);
        } else if (noNetworkCheckBox.isSelected() == false) {
            schedulingOption.setNoNetBackup(false);
        }
    }//GEN-LAST:event_noNetworkCheckBoxStateChanged

    private void autoBatteryBackCheckBoxStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_autoBatteryBackCheckBoxStateChanged
        // TODO add your handling code here:
        if (autoBatteryBackCheckBox.isSelected() == true) {
            schedulingOption.setBatteryRun(true);
        } else if (autoBatteryBackCheckBox.isSelected() == false) {
            schedulingOption.setBatteryRun(false);
        }
}//GEN-LAST:event_autoBatteryBackCheckBoxStateChanged

    private void DateComboActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_DateComboActionPerformed
        int a = new Date(Integer.parseInt(YearCombo.getSelectedItem().toString()), Integer.parseInt(MonthCombo.getSelectedItem().toString()) - 1, Integer.parseInt(DateCombo.getSelectedItem().toString())).getDate();
        int b = Integer.parseInt(DateCombo.getSelectedItem().toString());
        if (a != b) {
            JOptionPane.showMessageDialog(this, DateCombo.getSelectedItem() + "-" + MonthCombo.getSelectedItem() + "-" + YearCombo.getSelectedItem() + " is not a valid date");
            DateCombo.setSelectedItem("1");
        }
    }//GEN-LAST:event_DateComboActionPerformed

    private void MonthComboActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_MonthComboActionPerformed
        int a = new Date(Integer.parseInt(YearCombo.getSelectedItem().toString()), Integer.parseInt(MonthCombo.getSelectedItem().toString()) - 1, Integer.parseInt(DateCombo.getSelectedItem().toString())).getDate();
        int b = Integer.parseInt(DateCombo.getSelectedItem().toString());
        if (a != b) {
            JOptionPane.showMessageDialog(this, DateCombo.getSelectedItem() + "-" + MonthCombo.getSelectedItem() + "-" + YearCombo.getSelectedItem() + " is not a valid date");
            MonthCombo.setSelectedItem("1");
        }
    }//GEN-LAST:event_MonthComboActionPerformed

    private void YearComboActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_YearComboActionPerformed
    }//GEN-LAST:event_YearComboActionPerformed

    private void searchRadioButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_searchRadioButtonActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_searchRadioButtonActionPerformed

    private void onDayComboActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_onDayComboActionPerformed
        // TODO add your handling code here:
        schedulingOption.setSelectedDay((String) onDayCombo.getSelectedItem());
    }//GEN-LAST:event_onDayComboActionPerformed

    private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed
        MainForm.setOpened(false);
    }//GEN-LAST:event_formWindowClosed

    private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
        MainForm.setOpened(false);
    }//GEN-LAST:event_formWindowClosing

    private void optionTabbedPaneMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_optionTabbedPaneMouseClicked
        setScheduleSetting();
        JTabbedPane selectedTabbedPane = (JTabbedPane) evt.getSource();
        selecedTab = selectedTabbedPane.getTitleAt(selectedTabbedPane.getSelectedIndex());      
    }//GEN-LAST:event_optionTabbedPaneMouseClicked

    //code to peform action on click of popupmenu
    @Override
    public void actionPerformed(ActionEvent e) {
        if (e.getSource() == add_backup_sets) {
            new BackupSetEditor(this, true).setVisible(true);
        }
    }
    /*
     * (non-Javadoc)

    /**
     * @param args the command line arguments
     */

    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                new MainForm().setVisible(true);
                Logger.LogInConsole(true);
                Logger.LogText("Testing Logger");
                //      CreatXMLFile xmlfile = new CreatXMLFile();
                //      xmlfile.changeXmlStatusNode(System.getProperty("user.home") + "/pomblast/performancesettings.xml", "toman", 256);
            }
        });


    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel CPUidleLabel;
    private javax.swing.JSpinner CPUidleSpinner;
    private javax.swing.JLabel CPUstatusLabel;
    private javax.swing.JSpinner CPUstatusSpinner;
    private javax.swing.JComboBox DateCombo;
    public static javax.swing.JLabel FileDisplayLabel;
    public static javax.swing.JLabel File_label;
    private javax.swing.JScrollPane HistoryBottomScrollPane;
    private javax.swing.JLabel HoursLabel;
    private javax.swing.JPanel LeftDisplayPanel;
    private javax.swing.JComboBox MonthCombo;
    private javax.swing.JSpinner NumoftimeSpinner;
    private javax.swing.JLabel OnLabel;
    public static javax.swing.JProgressBar ProgressBar;
    private javax.swing.JPanel ProgressBarPanel;
    public static javax.swing.JLabel QuotaDisplayLabel;
    public static javax.swing.JLabel Quota_label;
    public static javax.swing.JLabel RemainingDisplayLabel;
    public static javax.swing.JLabel Remaining_label;
    private javax.swing.JScrollPane RestoreRightPane;
    public static javax.swing.JTable RestoreRightTable;
    public javax.swing.JButton Restore_bt;
    private javax.swing.JPanel RightDisplayPanel;
    private javax.swing.JPanel Scheduling;
    private javax.swing.JPanel StatusButtonPanel;
    private javax.swing.JLabel Timetolabel;
    public static javax.swing.JLabel UsedDisplayLabel;
    public static javax.swing.JLabel Used_label;
    private javax.swing.JComboBox YearCombo;
    private javax.swing.JCheckBox adFeatureCheckBox;
    private javax.swing.JPanel advancedPanel;
    private javax.swing.JLabel alertLabel;
    private javax.swing.JSpinner alertSpinner;
    private javax.swing.JCheckBox autoBatteryBackCheckBox;
    private javax.swing.JCheckBox autoLogCheckBox;
    private javax.swing.JRadioButton autobackupRadioButton;
    private javax.swing.JPanel automaticparametersPanel;
    private javax.swing.JLabel backupLabel;
    private javax.swing.JScrollPane backupLeftScrollPane;
    private javax.swing.JPanel backupPanel;
    private javax.swing.JScrollPane backupRightScrollPane;
    private javax.swing.JCheckBox backupStatusCheckBox;
    public static javax.swing.JTable backupsetLeftTable;
    private javax.swing.JButton backupsetsButton;
    private javax.swing.JSpinner backuptimeSpinner;
    public static javax.swing.JTable bacupsetViewFileTable;
    private javax.swing.JButton cancelButton;
    private javax.swing.JLabel capacityLabel;
    private javax.swing.JButton cofigureProxyBt;
    private javax.swing.JLabel dayLabel;
    private javax.swing.JSpinner daySpinner;
    private javax.swing.JLabel daysLabel;
    private javax.swing.JPanel detailPanel;
    private javax.swing.JPanel displayPanel;
    private javax.swing.JCheckBox enSupportEFScheckBox;
    private javax.swing.JCheckBox enSupportOpenCheckBox;
    private javax.swing.JCheckBox enableCheckBox;
    private javax.swing.JSlider enableSlider;
    private javax.swing.JScrollPane fileLeftScrollPane;
    public static javax.swing.JTable fileTable;
    private javax.swing.JSplitPane filesplitPanel;
    private javax.swing.JButton filesystemButton;
    private javax.swing.JPanel filesystemPanel;
    public static javax.swing.JPanel filetreePanel;
    private javax.swing.JTextField folderText;
    private javax.swing.JPanel generalPanel;
    public static javax.swing.JTable historyBottomTable;
    private javax.swing.JButton historyButton;
    private javax.swing.JPanel historyPanel;
    private javax.swing.JSplitPane historySplitPane;
    private javax.swing.JScrollPane historyTopScrollpane;
    private javax.swing.JTable historyTopTable;
    private javax.swing.JLabel howBackContentLabel;
    private javax.swing.JLabel howBackLabel;
    private javax.swing.JLabel howRestoreContentLabel;
    private javax.swing.JLabel howRestoreLabel;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JRadioButton jRadioButton3;
    private javax.swing.JRadioButton jRadioButton4;
    private javax.swing.JSlider jSlider1;
    private javax.swing.JSplitPane jSplitPane1;
    private javax.swing.JSplitPane jSplitPane2;
    private javax.swing.JLabel limitLabel;
    private javax.swing.JLabel logoLabel;
    private javax.swing.JPanel logoPanel;
    public javax.swing.JPanel mainMenuPanel;
    private javax.swing.JPanel mainPanel;
    public javax.swing.JPanel menuPanel;
    private javax.swing.JCheckBox noNetworkCheckBox;
    private javax.swing.JLabel numoftimesLabel;
    private javax.swing.JComboBox onDayCombo;
    private javax.swing.JPanel optionPanel;
    private javax.swing.JTabbedPane optionTabbedPane;
    private javax.swing.JButton optionsButton;
    private javax.swing.JPanel performancePanel;
    private javax.swing.JCheckBox preConfigCheckBox;
    private javax.swing.JButton raisequotaButton;
    private javax.swing.JPanel restorePanel;
    private javax.swing.JButton saveButton;
    private javax.swing.JComboBox scheduleComboBox;
    private javax.swing.JRadioButton schedulebackuptimeRadioButton;
    private javax.swing.JPanel scheulePanel;
    private javax.swing.JButton searchButton;
    private javax.swing.JRadioButton searchRadioButton;
    private javax.swing.JTextField searchText;
    private javax.swing.JCheckBox shProtectedCheckBox;
    private javax.swing.JCheckBox shRestoreOptionCheckBox;
    private javax.swing.JPanel statusMainPanel;
    private javax.swing.JPanel statusPanel;
    private javax.swing.JCheckBox tempSuspendCheckBox;
    private javax.swing.JRadioButton throttleRadioButton;
    private javax.swing.JRadioButton throttlehrsRadioButton;
    private javax.swing.JPanel throttlingPanel;
    private javax.swing.JLabel timefromLabel;
    private javax.swing.JSpinner timefromSpinner;
    private javax.swing.JSpinner timetoSpinner;
    private javax.swing.JPanel topDisplayPanel;
    private javax.swing.JCheckBox updateCheckBox;
    private javax.swing.JCheckBox virtualdriveCheckBox;
    private javax.swing.JCheckBox warnCheckBox;
    public javax.swing.JButton welcomeButton;
    private javax.swing.JLabel welcomeLabel;
    private javax.swing.JPanel welcomePanel;
    private javax.swing.JLabel whatPomContentLabel;
    private javax.swing.JLabel whatPomLabel;
    // End of variables declaration//GEN-END:variables
}
